'make test' build fixes
cover 'make test' build fixes
Hi,
I've tried to make 'make test' at least build on an s390 host (not that it does anything interesting yet...) by changing the compiler for a test that's supposed to be architecture agnostic and doing some whitespace fixes in find-in-path.
Build tested on Linux/s390 and Linux/x86.
Cornelia Huck (2):
tests/tcg: test_path is not i386 only
rules.mak: Fix find-in-path
rules.mak | 4 ++-- tests/tcg/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.12.4
PATCH 1/2 tests/tcg: test_path is not i386 only
test_path is supposed to be run for all architectures, so it should use the main compiler instead of the i386 compiler.
Signed-off-by Cornelia Huck <[email protected]>
--- tests/tcg/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/tcg/Makefile +2 -2
@@ -81,10 +81,10 @@ run-test_path: test_path # rules to compile tests test_path: test_path.o - $(CC_I386) $(LDFLAGS) -o $@ $^ $(LIBS) + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) test_path.o: test_path.c - $(CC_I386) $(QEMU_INCLUDES) $(GLIB_CFLAGS) $(CFLAGS) -c -o $@ $^ + $(CC) $(QEMU_INCLUDES) $(GLIB_CFLAGS) $(CFLAGS) -c -o $@ $^ hello-i386: hello-i386.c $(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
Signature · 1 line
1.7.12.4
PATCH 2/2 rules.mak: Fix find-in-path
In reply to Cornelia HuckWhitespace needs to be stripped before building the path and in the end to ensure we really get an empty string.
Signed-off-by Cornelia Huck <[email protected]>
--- rules.mak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
rules.mak +2 -2
@@ -55,9 +55,9 @@ set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) # Looks in the PATH if the argument contains no slash, else only considers one # specific directory. Returns an # empty string if the program doesn't exist # there. -find-in-path = $(if $(find-string /, $1), \ +find-in-path = $(strip $(if $(find-string /, $1), \ $(wildcard $1), \ - $(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH))))) + $(wildcard $(patsubst %, %/$(strip $1), $(subst :, ,$(PATH)))))) # Generate files with tracetool TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py
Signature · 1 line
1.7.12.4