summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch')
-rw-r--r--meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch b/meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch
new file mode 100644
index 000000000..e3fa2e1c1
--- /dev/null
+++ b/meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch
@@ -0,0 +1,42 @@
1From 1361225abbaba878960f970df39a4570bbc39553 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 26 May 2016 21:50:01 -0400
4Subject: [PATCH] fix compile failure with older host gcc (<=4.6)
5
6While host gcc version is 4.6.3 in ubuntu 1204, it
7did not recognize -std=gnu11 and -Wmaybe-uninitialized.
8
9While host gcc version is 4.4.7 in centos6, it
10did not recognize -std=gnu11, -Wmaybe-uninitialized,
11and -flto.
12
13For native build, use -std=gnu99 to replace -std=gnu11,
14and directly remove -Wmaybe-uninitialized and -flto.
15
16Upstream-Status: Pending
17
18Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
19---
20 gcc.specs | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23Index: git/gcc.specs
24===================================================================
25--- git.orig/gcc.specs
26+++ git/gcc.specs
27@@ -2,13 +2,13 @@
28 + -D_GNU_SOURCE
29
30 *efivar_cpp_options:
31- -Werror -Wall -std=gnu11 -Wextra
32+ -Werror -Wall -std=gnu99 -Wextra
33
34 *cpp_options:
35 + %(efivar_cpp_options)
36
37 *cc1_options:
38-+ %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
39++ %(efivar_cpp_options) -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
40
41 *self_spec:
42 + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now}