]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
gnu-efi: Do not use gcc-only options when building with clang
authorKhem Raj <raj.khem@gmail.com>
Mon, 7 Oct 2019 01:40:12 +0000 (18:40 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 15 Oct 2019 13:11:08 +0000 (14:11 +0100)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch [new file with mode: 0644]
meta/recipes-bsp/gnu-efi/gnu-efi_3.0.9.bb

diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch
new file mode 100644 (file)
index 0000000..c6d6600
--- /dev/null
@@ -0,0 +1,24 @@
+Fix building with CLANG-9.0.0 
+
+Fixes
+clang-9: error: unknown argument: '-maccumulate-outgoing-args'
+
+Upstream-Status: Submitted [https://sourceforge.net/p/gnu-efi/patches/70/]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -110,10 +110,10 @@
+                             || ( [ $(GCCVERSION) -eq "4" ]      \
+                                  && [ $(GCCMINOR) -ge "7" ] ) ) \
+                           && echo 1)
+-  ifeq ($(GCCNEWENOUGH),1)
+-    CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
+-  else ifeq ($(USING_CLANG),clang)
++  ifeq ($(USING_CLANG),clang)
+     CPPFLAGS += -DGNU_EFI_USE_MS_ABI --std=c11
++  else ifeq ($(GCCNEWENOUGH),1)
++    CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
+   endif
+   CFLAGS += -mno-red-zone
index f84443547287ae704b71f4604674b93d84d3d04a..6d4c30335377644241d599c1bea9c2c00fb35bbd 100644 (file)
@@ -15,6 +15,7 @@ LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=16;md5=e582
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
            file://parallel-make-archives.patch \
            file://lib-Makefile-fix-parallel-issue.patch \
+           file://gnu-efi-3.0.9-fix-clang-build.patch \
            "
 
 SRC_URI[md5sum] = "32af17b917545a693e549af2439c4a99"