xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1Fix building with CLANG-9.0.0
2
3Fixes
4clang-9: error: unknown argument: '-maccumulate-outgoing-args'
5
6Upstream-Status: Submitted [https://sourceforge.net/p/gnu-efi/patches/70/]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8
9--- a/Make.defaults
10+++ b/Make.defaults
11@@ -110,10 +110,10 @@
12                             || ( [ $(GCCVERSION) -eq "4" ]      \
13                                  && [ $(GCCMINOR) -ge "7" ] ) ) \
14                           && echo 1)
15-  ifeq ($(GCCNEWENOUGH),1)
16-    CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
17-  else ifeq ($(USING_CLANG),clang)
18+  ifeq ($(USING_CLANG),clang)
19     CPPFLAGS += -DGNU_EFI_USE_MS_ABI --std=c11
20+  else ifeq ($(GCCNEWENOUGH),1)
21+    CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
22   endif
23
24   CFLAGS += -mno-red-zone
25