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

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