1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

Add support for aarch64 in CI

This commit is contained in:
Andy Wingo 2019-05-16 12:03:38 +02:00
parent 9d4185af2b
commit 926275e123
2 changed files with 30 additions and 5 deletions

View file

@ -4,9 +4,11 @@
image: debian
before_script:
- dpkg --add-architecture i386
- dpkg --add-architecture i386 --add-architecture arm64
- apt-get update -qq
- apt-get install -y libc6-dev:amd64 libc6-dev:i386 gcc gcc-multilib make
- apt-get install -y \
libc6-dev:amd64 libc6-dev:i386 libc6-dev:arm64 \
gcc gcc-multilib gcc-aarch64-linux-gnu make
x86-64:
stage: test
@ -16,4 +18,9 @@ x86-64:
i686:
stage: test
script:
- make -C tests test-ia32
- make -C tests test-ia32 CC_IA32='gcc -m32'
aarch64:
stage: test
script:
- make -C tests test-aarch64 CC_AARCH64=gcc-aarch64-linux-gnu

View file

@ -1,8 +1,22 @@
TESTS=$(sort $(basename $(wildcard *.c)))
TARGETS=native
TARGETS=native ia32 aarch64
# Suitable values of cross-compiler variables for Debian, having previously done:
#
# CC_IA32 = gcc -m32
# CC_AARCH64 = gcc-aarch64-linux-gnu
#
# The relevant packages that you need to run this:
#
# dpkg --add-architecture i386 --add-architecture arm64
# apt-get update -qq
# apt-get install -y \
# libc6-dev:amd64 libc6-dev:i386 libc6-dev:arm64 \
# gcc gcc-multilib gcc-aarch64-linux-gnu make
#
CC = gcc
CC_IA32 = gcc -m32
CC_IA32='guix environment --pure -s i686-linux --ad-hoc gcc-toolchain glibc -- gcc'
CC_AARCH64='guix environment --pure -s aarch64-linux --ad-hoc gcc-toolchain glibc -- gcc'
CFLAGS = -Wall -O0 -g
all: $(foreach TARGET,$(TARGETS),$(addprefix test-$(TARGET)-,$(TESTS)))
@ -29,6 +43,10 @@ test-ia32-%: CC = $(CC_IA32)
test-ia32-%: %.c lightening-ia32.o test.h
$(CC) $(CFLAGS) $(CPPFLAGS) -I.. -o $@ lightening-ia32.o $<
test-aarch64-%: CC = $(CC_AARCH64)
test-aarch64-%: %.c lightening-aarch64.o test.h
$(CC) $(CFLAGS) $(CPPFLAGS) -I.. -o $@ lightening-aarch64.o $<
.PRECIOUS: $(foreach TARGET,$(TARGETS),$(addprefix test-$(TARGET)-,$(TESTS)))
.PRECIOUS: $(foreach TARGET,$(TARGETS),lightening-$(TARGET).o)