]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
efivar: Backport patch to fix -march issue for ppc64le
authorAndrew Geissler <geissonator@yahoo.com>
Tue, 5 May 2026 14:36:54 +0000 (09:36 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 May 2026 10:19:26 +0000 (11:19 +0100)
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 <geissonator@yahoo.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-bsp/efivar/efivar/0003-fix-march-issue-for-ppc64le.patch [new file with mode: 0644]
meta/recipes-bsp/efivar/efivar_39.bb

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 (file)
index 0000000..d27541a
--- /dev/null
@@ -0,0 +1,45 @@
+From 9711b8aa5acc63c54a12ba5505fe68b4475c8a13 Mon Sep 17 00:00:00 2001
+From: Andrew Geissler <geissonator@yahoo.com>
+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 <geissonator@yahoo.com>
+
+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
+
index c0e8d5218197368ed1be8e80fc0a5aa125a5878d..e5839f7a990e3d9869e8b08bf23201d843708a0b 100644 (file)
@@ -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"