efivar/0040-Make-sure-makeguids-helper-is-compiled-for-the-host-.patch
Petr Šabata 974b936917 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/efivar#9f54d8029387895b7b1389d9a9f9e0bf476a027f
2020-10-14 23:58:29 +02:00

38 lines
1.4 KiB
Diff

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