diff mbox series

[v2] gnu-efi: Fix build on musl

Message ID 20230809205630.2723070-1-raj.khem@gmail.com
State Accepted, archived
Commit 645d2bd6dee1d33a722e962d9f916540c2ef68a4
Headers show
Series [v2] gnu-efi: Fix build on musl | expand

Commit Message

Khem Raj Aug. 9, 2023, 8:56 p.m. UTC
Build with musl emits extra warnings about pointer incompatibility due
to different type of wchar_t than glibc which turns to be error in the
end, disable -Werror for musl.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Always apply the patch

 .../gnu-efi/gnu-efi/no-werror.patch           | 19 +++++++++++++++++++
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb    |  2 +-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch
diff mbox series

Patch

diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch
new file mode 100644
index 00000000000..db2bcf70b76
--- /dev/null
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch
@@ -0,0 +1,19 @@ 
+Do not treat warnings as errors
+
+There are additional warnings found with musl which are
+treated as errors and fails the build, we have more combinations
+then upstream supports to handle
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [OE specific]
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -187,7 +187,7 @@ CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wex
+            -funsigned-char -fshort-wchar -fno-strict-aliasing \
+            -ffreestanding -fno-stack-protector
+ else
+-CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign -Werror \
++CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign \
+            -funsigned-char -fshort-wchar -fno-strict-aliasing \
+ 	   -ffreestanding -fno-stack-protector -fno-stack-check \
+            -fno-stack-check \
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb
index d37d638e097..43b7cc7529e 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb
@@ -17,8 +17,8 @@  SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/files/${BP}.tar.bz2 \
            file://gnu-efi-3.0.9-fix-clang-build.patch \
            file://0001-riscv64-adjust-type-definitions.patch \
            file://0001-riscv64-ignore-unknown-relocs.patch \
+           file://no-werror.patch \
            "
-
 SRC_URI[sha256sum] = "7807e903349343a7a142ebb934703a2872235e89688cf586c032b0a1087bcaf4"
 
 COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*|riscv64.*)-linux"