Commit 1ec7b011 authored by Ben Pfaff's avatar Ben Pfaff
Browse files

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 <jdhuang@stanford.edu>.
parent 2026ecce
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment