From 2e7e4557b7f84a1377d38c1b4db544251bcec317 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 1 May 2010 11:20:14 -0700 Subject: [PATCH] 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 . --- src/Make.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2