[ipxe-devel] [PATCH] [build] Add HOST_WORKAROUND_CFLAGS

Geoff Levand geoff at infradead.org
Tue Jul 31 19:01:59 UTC 2018


To support cross compiling the workaround flags need to be split
into host and target flags.

Fixes build errors like these when cross compiling for arm64:

  [HOSTCC] util/elf2efi64
  gcc: error: unrecognized argument in option ‘-mabi=lp64’
  gcc: note: valid arguments to ‘-mabi=’ are: ms sysv

Signed-off-by: Geoff Levand <geoff at infradead.org>
---
 src/Makefile.housekeeping | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index f8334921..f2295374 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -130,6 +130,7 @@ eval :
 # Check for various tool workarounds
 #
 
+HOST_WORKAROUND_CFLAGS :=
 WORKAROUND_CFLAGS :=
 WORKAROUND_ASFLAGS :=
 WORKAROUND_LDFLAGS :=
@@ -445,7 +446,7 @@ endif
 CFLAGS		+= $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS)
 ASFLAGS		+= $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS)
 LDFLAGS		+= $(WORKAROUND_LDFLAGS) $(EXTRA_LDFLAGS)
-HOST_CFLAGS	+= $(WORKAROUND_CFLAGS) -O2 -g
+HOST_CFLAGS	+= $(HOST_WORKAROUND_CFLAGS) -O2 -g
 
 # Inhibit -Werror if NO_WERROR is specified on make command line
 #
-- 
2.14.1




More information about the ipxe-devel mailing list