From 1ec7b011dc73affe02a46be228fbc85d2d74384f 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