Blame SOURCES/0040-Make-sure-makeguids-helper-is-compiled-for-the-host-.patch

a43681
From 4baa930ea79314e778a5ca84e3f85e94b2f9968f Mon Sep 17 00:00:00 2001
a43681
From: Dmitry Torokhov <dtor@chromium.org>
a43681
Date: Tue, 6 Aug 2019 09:22:25 -0700
a43681
Subject: [PATCH 40/63] Make sure makeguids helper is compiled for the host's
a43681
 arch
a43681
a43681
Currently makeguids is compiled with the same flags/settings as the rest
a43681
of the package, which does not work in case of cross-compiles when arch
a43681
of the build host and the target host are different. Let's force
a43681
compiling for the native host arch to avoid this issue.
a43681
a43681
Note that this is not a full cross-compile solution as this does not
a43681
account for potential differences in host/target compilers (versions,
a43681
clang vs gcc, etc), but it removes one of the issue with package build
a43681
aborting due to invalid instruction on the host.
a43681
a43681
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
a43681
---
a43681
 src/Makefile | 2 +-
a43681
 1 file changed, 1 insertion(+), 1 deletion(-)
a43681
a43681
diff --git a/src/Makefile b/src/Makefile
a43681
index addfaa03c85..3729d2b8f35 100644
a43681
--- a/src/Makefile
a43681
+++ b/src/Makefile
a43681
@@ -52,7 +52,7 @@ include/efivar/efivar-guids.h : makeguids guids.txt
a43681
 	./makeguids guids.txt guids.bin names.bin \
a43681
 		guid-symbols.c include/efivar/efivar-guids.h
a43681
 
a43681
-makeguids : CPPFLAGS+=-DEFIVAR_BUILD_ENVIRONMENT
a43681
+makeguids : CPPFLAGS+=-DEFIVAR_BUILD_ENVIRONMENT -march=native
a43681
 makeguids : LIBS=dl
a43681
 makeguids : $(MAKEGUIDS_SOURCES)
a43681
 makeguids : CCLD=$(CCLD_FOR_BUILD)
a43681
-- 
a43681
2.26.2
a43681