]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
gnu-efi: Fix build on musl
authorKhem Raj <raj.khem@gmail.com>
Wed, 9 Aug 2023 20:56:30 +0000 (13:56 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 14 Aug 2023 11:51:18 +0000 (12:51 +0100)
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>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch [new file with mode: 0644]
meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb

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 (file)
index 0000000..db2bcf7
--- /dev/null
@@ -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 \
index d37d638e097550e90c60b6f26bcbc35916aebb34..43b7cc7529e84d93e7fc6a74b6a1ce6cb081d3c5 100644 (file)
@@ -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"