These tests are a little strange as they use their own crt.o stub instead of the system supplied one. We also disable the multiarch testthread test as that requires a dynamically linked build.
Signed-off-by: Alex Bennée <[email protected]> --- tests/tcg/alpha/Makefile | 35 -------------------------------- tests/tcg/alpha/Makefile.target | 32 +++++++++++++++++++++++++++++ tests/tcg/alpha/{crt.s => crt.S} | 0 3 files changed, 32 insertions(+), 35 deletions(-) delete mode 100644 tests/tcg/alpha/Makefile create mode 100644 tests/tcg/alpha/Makefile.target rename tests/tcg/alpha/{crt.s => crt.S} (100%) diff --git a/tests/tcg/alpha/Makefile b/tests/tcg/alpha/Makefile deleted file mode 100644 index 2b1f03d048..0000000000 --- a/tests/tcg/alpha/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -CROSS=alpha-linux-gnu- -CC=$(CROSS)gcc -AS=$(CROSS)as - -SIM=../../alpha-linux-user/qemu-alpha - -CFLAGS=-O -LINK=$(CC) -o $@ crt.o $< -nostdlib - -TESTS=test-cond test-cmov - -all: hello-alpha $(TESTS) - -hello-alpha: hello-alpha.o crt.o - $(LINK) - -test-cond: test-cond.o crt.o - $(LINK) - -test-cmov.o: test-cond.c - $(CC) -c $(CFLAGS) -DTEST_CMOV -o $@ $< - -test-cmov: test-cmov.o crt.o - $(LINK) - -test-ovf: test-ovf.o crt.o - $(LINK) - -check: $(TESTS) - for f in $(TESTS); do $(SIM) $$f || exit 1; done - -clean: - $(RM) *.o *~ hello-alpha $(TESTS) - -.PHONY: clean all check diff --git a/tests/tcg/alpha/Makefile.target b/tests/tcg/alpha/Makefile.target new file mode 100644 index 0000000000..5b573f145e --- /dev/null +++ b/tests/tcg/alpha/Makefile.target @@ -0,0 +1,32 @@ +# -*- Mode: makefile -*- +# +# Alpha specific tweaks + +ALPHA_SRC=$(SRC_PATH)/tests/tcg/alpha +VPATH+=$(ALPHA_SRC) + +ALPHA_TESTS=hello-alpha test-cond test-cmov test-ovf +TESTS+=$(ALPHA_TESTS) + +# Our own minimal crt.o, bypassing gcc's version +crt.o: CFLAGS+=-ffreestanding +crt.o: crt.S + $(CC) $(CFLAGS) -c $< -o $@ + +# Alternative build, linking against local crt.o +ALPHA_BUILD=$(CC) -o $@ crt.o $< -nostdlib + +hello-alpha: hello-alpha.c crt.o + $(ALPHA_BUILD) + +test-cond: test-cond.c crt.o + $(ALPHA_BUILD) + +test-cmov.o: test-cond.c + $(CC) $(CFLAGS) -DTEST_CMOV -c $< -o $@ + +test-cmov: test-cmov.o crt.o + $(ALPHA_BUILD) + +test-ovf: test-ovf.c crt.o + $(ALPHA_BUILD) diff --git a/tests/tcg/alpha/crt.s b/tests/tcg/alpha/crt.S similarity index 100% rename from tests/tcg/alpha/crt.s rename to tests/tcg/alpha/crt.S -- 2.17.0
