summaryrefslogtreecommitdiffstats
path: root/src/Makefile.housekeeping
diff options
context:
space:
mode:
authorMichael Brown2021-01-30 02:56:16 +0100
committerMichael Brown2021-01-30 19:37:01 +0100
commit1fea8ce06abf997dbfd6b1f5e4470cd708b478c8 (patch)
tree02ac58604cb41094ddb346dd9188636fd5b2728b /src/Makefile.housekeeping
parent[build] Avoid modifying load addresses when stripping .zinfo section (diff)
downloadipxe-1fea8ce06abf997dbfd6b1f5e4470cd708b478c8.tar.gz
ipxe-1fea8ce06abf997dbfd6b1f5e4470cd708b478c8.tar.xz
ipxe-1fea8ce06abf997dbfd6b1f5e4470cd708b478c8.zip
[build] Check for broken elftoolchain version of objcopy
The elftoolchain version of objcopy (as used in FreeBSD) seems to be unusable for generating a raw binary file, since it will apparently ignore the load memory addresses specified for each section in the input file. The binutils version of objcopy may be used on FreeBSD by specifying OBJCOPY=/usr/local/bin/objcopy Detect an attempt to use the unusable elftoolchain version of objcopy and report it as an error. 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 9b52e12c..25abe571 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -113,6 +113,13 @@ $(warning Use GNU ld instead)
$(error Unsuitable build environment found)
endif
+OBJCOPY_ETC_BANNER := $(shell $(OBJCOPY) --version | grep 'elftoolchain')
+ifneq ($(OBJCOPY_ETC_BANNER),)
+$(warning The elftoolchain objcopy is unsuitable for building iPXE)
+$(warning Use binutils objcopy instead)
+$(error Unsuitable build environment found)
+endif
+
###############################################################################
#
# Check if $(eval ...) is available to use