Skip to contentSkip to conversation

'make test' build fixes

PATCH New Cornelia Huck 1 participant 3 messages Nov 14, 2012

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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.

---
 tests/tcg/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/tcg/Makefile +2 -2
index 24e3154..2ffa067 100644
@@ -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
#2 lore raw

PATCH 2/2 rules.mak: Fix find-in-path

In reply to Cornelia Huck

Whitespace needs to be stripped before building the path and in the end to ensure we really get an empty string.

---
 rules.mak | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
rules.mak +2 -2
index 1b173aa..66b1d79 100644
@@ -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