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

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