Backport upstream commit 9711b8aa5acc to fix compilation errors on ppc64le architecture. The issue occurs because GCC on ppc64le does not recognize the '-march=native' option and suggests using '-mcpu=native' instead.
Upstream commit: https://github.com/rhboot/efivar/commit/9711b8aa5acc63c54a12ba5505fe68b4475c8a13 Signed-off-by: Andrew Geissler <[email protected]> --- .../0003-fix-march-issue-for-ppc64le.patch | 45 +++++++++++++++++++ meta/recipes-bsp/efivar/efivar_39.bb | 1 + 2 files changed, 46 insertions(+) create mode 100644 meta/recipes-bsp/efivar/efivar/0003-fix-march-issue-for-ppc64le.patch diff --git a/meta/recipes-bsp/efivar/efivar/0003-fix-march-issue-for-ppc64le.patch b/meta/recipes-bsp/efivar/efivar/0003-fix-march-issue-for-ppc64le.patch new file mode 100644 index 0000000000..d27541aeb1 --- /dev/null +++ b/meta/recipes-bsp/efivar/efivar/0003-fix-march-issue-for-ppc64le.patch @@ -0,0 +1,45 @@ +From 9711b8aa5acc63c54a12ba5505fe68b4475c8a13 Mon Sep 17 00:00:00 2001 +From: Andrew Geissler <[email protected]> +Date: Tue, 4 Nov 2025 09:58:55 -0600 +Subject: [PATCH] Fix the -march issue for ppc64le + +Similar to the fix in aab4e9b10ac, need to also support the ppc64le +architecture. + +The failure without this fix on a ppc64le machine: + +| cp util.c util-makeguids.c +| gcc: error: unrecognized command-line option '-march=native'; did you mean '-mcpu=native'? + +Signed-off-by: Andrew Geissler <[email protected]> + +Upstream-Status: Backport [https://github.com/rhboot/efivar/commit/9711b8aa5acc63c54a12ba5505fe68b4475c8a13] +--- + src/include/defaults.mk | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/include/defaults.mk b/src/include/defaults.mk +index 4da0cde3..a21a7aeb 100644 +--- a/src/include/defaults.mk ++++ b/src/include/defaults.mk +@@ -74,6 +74,7 @@ override SOFLAGS = $(_SOFLAGS) \ + HOST_ARCH=$(shell uname -m) + ifneq ($(HOST_ARCH),ia64) + ifneq ($(HOST_ARCH),riscv64) ++ifneq ($(HOST_ARCH),ppc64le) + HOST_MARCH=-march=native + else + HOST_MARCH= +@@ -81,6 +82,9 @@ endif + else + HOST_MARCH= + endif ++else ++ HOST_MARCH= ++endif + HOST_CPPFLAGS ?= $(CPPFLAGS) + override _HOST_CPPFLAGS := $(HOST_CPPFLAGS) + override HOST_CPPFLAGS = $(_HOST_CPPFLAGS) \ +-- +2.34.1 + diff --git a/meta/recipes-bsp/efivar/efivar_39.bb b/meta/recipes-bsp/efivar/efivar_39.bb index c0e8d52181..e5839f7a99 100644 --- a/meta/recipes-bsp/efivar/efivar_39.bb +++ b/meta/recipes-bsp/efivar/efivar_39.bb @@ -10,6 +10,7 @@ COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64|riscv64).*-linux" SRC_URI = "git://github.com/rhinstaller/efivar.git;branch=main;protocol=https \ file://0001-docs-do-not-build-efisecdb-manpage.patch \ file://0002-efivarfs-backport-patch-to-update-file-variable-store-on-SetVariableRT.patch \ + file://0003-fix-march-issue-for-ppc64le.patch \ " SRCREV = "c47820c37ac26286559ec004de07d48d05f3308c" -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#236489): https://lists.openembedded.org/g/openembedded-core/message/236489 Mute This Topic: https://lists.openembedded.org/mt/119161985/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
