From: Ben Pfaff Date: Sat, 1 May 2010 18:20:14 +0000 (-0700) Subject: Make.config: Use a different method to detect --build-id support. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e7e4557b7f84a1377d38c1b4db544251bcec317;p=pintos-anon Make.config: Use a different method to detect --build-id support. Some versions of ld accept /dev/null as a valid input file. Others will not. The latter versions will give false negatives for --buil-id support, which breaks linking of Pintos userspace programs. So use a different method, that I hope will be more reliable, to detect --build-id support. Reported by Joseph Huang . --- diff --git a/src/Make.config b/src/Make.config index 3279301..40feba6 100644 --- a/src/Make.config +++ b/src/Make.config @@ -45,7 +45,7 @@ CFLAGS += -fno-stack-protector endif # Turn off --build-id in the linker, which confuses the Pintos loader. -ifeq ($(strip $(shell $(LD) --build-id=none -e 0 /dev/null -o /dev/null 2>&1; echo $$?)),0) +ifeq ($(strip $(shell $(LD) --help | grep -q build-id; echo $$?)),0) LDFLAGS += -Wl,--build-id=none endif