1 |
commit: c288da02f7fc90f969d06a4dbd50b22cfa782d6d |
2 |
Author: Leno Hou <lenohou <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Jun 28 14:31:29 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 28 17:47:02 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/ppc64le.git/commit/?id=c288da02 |
7 |
|
8 |
sys-devel/binutils: add ld BE emulations for ppc64le target #580614 |
9 |
|
10 |
Signed-off-by: Leno Hou <lenohou <AT> gmail.com> |
11 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
12 |
|
13 |
eclass/toolchain-binutils.eclass | 10 ++++++++++ |
14 |
.../binutils/files/binutils-configure-target.patch | 18 ++++++++++++++++++ |
15 |
2 files changed, 28 insertions(+) |
16 |
|
17 |
diff --git a/eclass/toolchain-binutils.eclass b/eclass/toolchain-binutils.eclass |
18 |
index 34c8569..17eb5dc 100644 |
19 |
--- a/eclass/toolchain-binutils.eclass |
20 |
+++ b/eclass/toolchain-binutils.eclass |
21 |
@@ -180,6 +180,16 @@ tc-binutils_apply_patches() { |
22 |
eend $? |
23 |
done |
24 |
fi |
25 |
+ |
26 |
+ # fix emulations issues if possible #580614 |
27 |
+ if [[ -e ${FILESDIR}/binutils-configure-target.patch ]] ; then |
28 |
+ einfo "Fixing emulations issues in configure target files" |
29 |
+ ebegin " Updating ld/configure.tgt" |
30 |
+ patch "ld/configure.tgt" "${FILESDIR}"/binutils-configure-target.patch >& "${T}"/configure-target-patch.log \ |
31 |
+ || eerror "Please file a bug about this" |
32 |
+ eend $? |
33 |
+ fi |
34 |
+ |
35 |
# fix conflicts with newer glibc #272594 |
36 |
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then |
37 |
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c |
38 |
|
39 |
diff --git a/sys-devel/binutils/files/binutils-configure-target.patch b/sys-devel/binutils/files/binutils-configure-target.patch |
40 |
new file mode 100644 |
41 |
index 0000000..0cd8778 |
42 |
--- /dev/null |
43 |
+++ b/sys-devel/binutils/files/binutils-configure-target.patch |
44 |
@@ -0,0 +1,18 @@ |
45 |
+--- ld/configure.tgt.orig 2016-05-15 07:49:39.661039407 +0000 |
46 |
++++ ld/configure.tgt 2016-05-15 08:15:24.441045822 +0000 |
47 |
+@@ -586,10 +586,13 @@ |
48 |
+ esac |
49 |
+ case "${targ}" in |
50 |
+ powerpc*le-*) |
51 |
+- for z in targ_emul targ_extra_emuls targ_extra_libpath targ64_extra_emuls targ64_extra_libpath |
52 |
++ for z in targ_extra_emuls targ_extra_libpath targ64_extra_emuls targ64_extra_libpath |
53 |
+ do |
54 |
+- eval ${z}=\"`eval echo \\$${z} | sed -e 's/ppc/lppc/g'`\" |
55 |
++ eval ${z}+=\" `eval echo \\$${z} | sed -e 's/ppc/lppc/g'`\" |
56 |
+ done |
57 |
++ eval targ_extra_emuls+=\" \$targ_emul\" |
58 |
++ eval targ_emul=\"`eval echo \\$targ_emul | sed -e 's/ppc/lppc/g'`\" |
59 |
++ |
60 |
+ esac ;; |
61 |
+ powerpc-*-nto*) targ_emul=elf32ppcnto ;; |
62 |
+ powerpcle-*-nto*) targ_emul=elf32lppcnto ;; |