summaryrefslogtreecommitdiffstats
path: root/src/Makefile.housekeeping
diff options
context:
space:
mode:
authorMichael Brown2011-04-05 15:59:27 +0200
committerMichael Brown2011-04-05 15:59:27 +0200
commit6e6ecacebf521b5ce91d8c141ca095e180fe762f (patch)
tree60ff322b58ca7bb3498acea92bc5bc10f522783f /src/Makefile.housekeeping
parent[build] Perform tool checks on each make invocation (diff)
downloadipxe-6e6ecacebf521b5ce91d8c141ca095e180fe762f.tar.gz
ipxe-6e6ecacebf521b5ce91d8c141ca095e180fe762f.tar.xz
ipxe-6e6ecacebf521b5ce91d8c141ca095e180fe762f.zip
[build] Refuse to attempt building with the GNU gold linker
GNU gold (part of newer binutils builds) does not appear to be designed to support generic linker functionality, since its source code contains several Linux-specific hard-coded assumptions about the layout of ELF binaries. Attempting to build iPXE using GNU gold will generally cause some kind of "linker internal error". Provide an explicit error message suggesting the use of GNU ld instead. Reported-by: Chris Hills <chaz@chaz6.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r--src/Makefile.housekeeping7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 7d7bbebc..ba01f16d 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -106,6 +106,13 @@ $(warning export LANG=$${LANG%.UTF-8})
$(error Unsuitable build environment found)
endif
+LD_GOLD_BANNER := $(shell $(LD) -v 2>&1 | grep 'GNU gold')
+ifneq ($(LD_GOLD_BANNER),)
+$(warning GNU gold is unsuitable for building iPXE)
+$(warning Use GNU ld instead)
+$(error Unsuitable build environment found)
+endif
+
###############################################################################
#
# Check for various tool workarounds