[oe] [PATCH 5/5] efivar: fix unknown option while gold linker used
Hongxu Jia
hongxu.jia at windriver.com
Tue May 10 16:19:39 UTC 2016
- Use '-fPIC' to replace 'PIC';
- Use 'pie' to replace 'PIE'
- Remove unknown '--add-needed'
Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
.../0004-fix-unknow-option-for-gold-linker.patch | 40 ++++++++++++++++++++++
meta-oe/recipes-extended/efivar/efivar_0.23.bb | 1 +
2 files changed, 41 insertions(+)
create mode 100644 meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch
diff --git a/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch b/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch
new file mode 100644
index 0000000..44194d1
--- /dev/null
+++ b/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch
@@ -0,0 +1,40 @@
+From 3ea4b2d9eb0aab65413b66ece1e0234f3fc5e8a0 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia at windriver.com>
+Date: Tue, 10 May 2016 11:47:20 -0400
+Subject: [PATCH] fix unknow option for gold linker
+
+- Revert the following patch, since oe-core work with gcc 5
+...
+commit 3055a3797f16693dfdd855fa68bc57fd900dc408
+Author: Peter Jones <pjones at redhat.com>
+Date: Mon Feb 15 14:15:40 2016 -0500
+
+ Make gcc.specs work with gcc 6 / binutils 2.26
+
+ Apparently binutils 2.26 gets real picky about "ld -PIC" vs "ld -fPIC".
+
+ Signed-off-by: Peter Jones <pjones at redhat.com>
+...
+
+- Remove unknown option '--add-needed'
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
+---
+ gcc.specs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc.specs b/gcc.specs
+index 24fabc2..d27feb3 100644
+--- a/gcc.specs
++++ b/gcc.specs
+@@ -14,4 +14,4 @@
+ + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now}
+
+ *link:
+-+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-PIE}} %{shared:-z relro -PIC} %{static:%<pie}
+++ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined -z now --build-id %{!static:%{!shared:-fPIE}} %{shared:-z relro -fPIC} %{static:%<pie}
+--
+2.8.1
+
diff --git a/meta-oe/recipes-extended/efivar/efivar_0.23.bb b/meta-oe/recipes-extended/efivar/efivar_0.23.bb
index 9c47461..6e9a51f 100644
--- a/meta-oe/recipes-extended/efivar/efivar_0.23.bb
+++ b/meta-oe/recipes-extended/efivar/efivar_0.23.bb
@@ -12,6 +12,7 @@ SRC_URI = "git://github.com/rhinstaller/efivar.git"
SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \
file://0002-disable-static-build.patch \
file://0003-efivar-fix-for-cross-compile.patch \
+ file://0004-fix-unknow-option-for-gold-linker.patch \
"
S = "${WORKDIR}/git"
--
2.8.1
More information about the Openembedded-devel
mailing list