diff mbox series

gnu-efi: Do not use gcc-only options when building with clang

Message ID 20191007014012.982396-1-raj.khem@gmail.com
State Accepted
Commit 385126d1f1cc6af5882b9a926295f4f54e657613
Headers show
Series gnu-efi: Do not use gcc-only options when building with clang | expand

Commit Message

Khem Raj Oct. 7, 2019, 1:40 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../gnu-efi-3.0.9-fix-clang-build.patch       | 24 +++++++++++++++++++
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.9.bb     |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch

-- 
2.23.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

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
index 0000000000..c6d660095e
--- /dev/null
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch
@@ -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
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.9.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.9.bb
index f844435472..6d4c303353 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.9.bb
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.9.bb
@@ -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"