[coreboot] r3543 - trunk/coreboot-v2/targets
svn at coreboot.org
svn at coreboot.org
Thu Aug 28 00:25:56 CEST 2008
Author: hailfinger
Date: 2008-08-28 00:25:55 +0200 (Thu, 28 Aug 2008)
New Revision: 3543
Modified:
trunk/coreboot-v2/targets/buildtarget
Log:
Capture output from 'ld --help', in order that the test
becomes meaningful. The linker puts help texts on stderr.
Signed-off-by: Mats Erik Andersson <mats.andersson at gisladisker.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Modified: trunk/coreboot-v2/targets/buildtarget
===================================================================
--- trunk/coreboot-v2/targets/buildtarget 2008-08-27 21:53:11 UTC (rev 3542)
+++ trunk/coreboot-v2/targets/buildtarget 2008-08-27 22:25:55 UTC (rev 3543)
@@ -69,7 +69,12 @@
rm -rf .$$.tmp
-if $CC -Wl,--help | grep -q build-id; then
+# The linker output fd depends on the gcc version.
+# 1) 'ld-2.15 --help' and 'gcc-4.0 -Wl,--help' use STDOUT.
+# 2) 'gcc-3.3 --help' and 'gcc-3.4 -Wl,--help' use STDERR.
+# Thus older versions of GCC (presumably 3.x) implement a redirection of
+# output to stderr. Re-redirect stderr to stdout to work always.
+if $CC -Wl,--help 2>&1 | grep -q build-id; then
EXTRA_LFLAGS="$EXTRA_LFLAGS -Wl,--build-id=none"
fi
More information about the coreboot
mailing list