浏览代码

[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>
tags/v1.20.1
Michael Brown 13 年前
父节点
当前提交
6e6ecacebf
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7
    0
      src/Makefile.housekeeping

+ 7
- 0
src/Makefile.housekeeping 查看文件

@@ -106,6 +106,13 @@ $(warning export LANG=$${LANG%.UTF-8})
106 106
 $(error Unsuitable build environment found)
107 107
 endif
108 108
 
109
+LD_GOLD_BANNER := $(shell $(LD) -v 2>&1 | grep 'GNU gold')
110
+ifneq ($(LD_GOLD_BANNER),)
111
+$(warning GNU gold is unsuitable for building iPXE)
112
+$(warning Use GNU ld instead)
113
+$(error Unsuitable build environment found)
114
+endif
115
+
109 116
 ###############################################################################
110 117
 #
111 118
 # Check for various tool workarounds

正在加载...
取消
保存