diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2016-05-30 03:39:23 -0400 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-06-08 14:55:24 +0200 |
commit | 0cce9fee049c3186cd07d791f602ada52e5afbc9 (patch) | |
tree | 34989061bd0cb1683650f983a04966810fb5a7df /meta-oe | |
parent | 25f31a59529a7df6895cd0df16a5b4541af86b33 (diff) | |
download | meta-openembedded-0cce9fee049c3186cd07d791f602ada52e5afbc9.tar.gz |
efivar-native: fix compile failure with older host gcc (<=4.6)
While host gcc version is 4.6.3 in ubuntu 1204, it
did not recognize -std=gnu11 and -Wmaybe-uninitialized.
While host gcc version is 4.4.7 in centos6, it
did not recognize -std=gnu11, -Wmaybe-uninitialized,
and -flto.
For native build, use -std=gnu99 to replace -std=gnu11,
and directly remove -Wmaybe-uninitialized and -flto.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch | 45 | ||||
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar_0.23.bb | 2 |
2 files changed, 47 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch b/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch new file mode 100644 index 000000000..1c68a2934 --- /dev/null +++ b/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 1361225abbaba878960f970df39a4570bbc39553 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Thu, 26 May 2016 21:50:01 -0400 | ||
4 | Subject: [PATCH] fix compile failure with older host gcc (<=4.6) | ||
5 | |||
6 | While host gcc version is 4.6.3 in ubuntu 1204, it | ||
7 | did not recognize -std=gnu11 and -Wmaybe-uninitialized. | ||
8 | |||
9 | While host gcc version is 4.4.7 in centos6, it | ||
10 | did not recognize -std=gnu11, -Wmaybe-uninitialized, | ||
11 | and -flto. | ||
12 | |||
13 | For native build, use -std=gnu99 to replace -std=gnu11, | ||
14 | and directly remove -Wmaybe-uninitialized and -flto. | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
19 | --- | ||
20 | gcc.specs | 4 ++-- | ||
21 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/gcc.specs b/gcc.specs | ||
24 | index 0d4bbda..3802ca6 100644 | ||
25 | --- a/gcc.specs | ||
26 | +++ b/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 -flto -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} | ||
43 | -- | ||
44 | 2.8.1 | ||
45 | |||
diff --git a/meta-oe/recipes-extended/efivar/efivar_0.23.bb b/meta-oe/recipes-extended/efivar/efivar_0.23.bb index 6e9a51fc9..046cad974 100644 --- a/meta-oe/recipes-extended/efivar/efivar_0.23.bb +++ b/meta-oe/recipes-extended/efivar/efivar_0.23.bb | |||
@@ -14,6 +14,8 @@ SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \ | |||
14 | file://0003-efivar-fix-for-cross-compile.patch \ | 14 | file://0003-efivar-fix-for-cross-compile.patch \ |
15 | file://0004-fix-unknow-option-for-gold-linker.patch \ | 15 | file://0004-fix-unknow-option-for-gold-linker.patch \ |
16 | " | 16 | " |
17 | SRC_URI_append_class-native = " file://fix-compile-failure-with-host-gcc-4.6.patch \ | ||
18 | " | ||
17 | 19 | ||
18 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
19 | 21 | ||