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

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