]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Fix building on broken versions of GNU binutils
authorMichael Brown <mcb30@ipxe.org>
Thu, 17 Jun 2021 13:32:23 +0000 (14:32 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 17 Jun 2021 13:37:39 +0000 (14:37 +0100)
Some versions of GNU objcopy (observed with binutils 2.23.52.0.1 on
CentOS 7.0.1406) document the -D/--enable-deterministic-archives
option but fail to recognise the short form of the option.

Work around this problem by using the long form of the option.

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/Makefile.housekeeping

index 9be7e7e13b15fa7e4256d033a286974e02bf4ad9..0deb15c10c894cb5ab324b98fbc6c8d757cfe37b 100644 (file)
@@ -1167,7 +1167,8 @@ $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
        $(Q)$(RM) $(BLIB)
        $(QM)$(ECHO) "  [AR] $@"
        $(Q)$(AR) rD $@ $(sort $(BLIB_OBJS))
-       $(Q)$(OBJCOPY) -D --prefix-symbols=$(SYMBOL_PREFIX) $@
+       $(Q)$(OBJCOPY) --enable-deterministic-archives \
+                      --prefix-symbols=$(SYMBOL_PREFIX) $@
        $(Q)$(RANLIB) -D $@
 blib : $(BLIB)