Gentoo Archives: gentoo-dev

From: Leno Hou <lenohou@×××××.com>
To: gentoo-dev@l.g.o, blueness@g.o, vapier@g.o
Cc: Leno Hou <lenohou@×××××.com>
Subject: [gentoo-dev][ppc64le][PATCH 10/12] sys-devel/binutils: add ld BE emulations for ppc64le target #580614
Date: Tue, 28 Jun 2016 14:37:57
Message-Id: 1467124291-13312-10-git-send-email-lenohou@gmail.com
In Reply to: [gentoo-dev][ppc64le][PATCH 01/12] sys-devel/libtool: add m4/libtool.m4 patch for ppc64le #581314 by Leno Hou
1 Signed-off-by: Leno Hou <lenohou@×××××.com>
2 ---
3 eclass/toolchain-binutils.eclass | 10 ++++++++++
4 .../binutils/files/binutils-configure-target.patch | 18 ++++++++++++++++++
5 2 files changed, 28 insertions(+)
6 create mode 100644 sys-devel/binutils/files/binutils-configure-target.patch
7
8 diff --git a/eclass/toolchain-binutils.eclass b/eclass/toolchain-binutils.eclass
9 index 34c8569..17eb5dc 100644
10 --- a/eclass/toolchain-binutils.eclass
11 +++ b/eclass/toolchain-binutils.eclass
12 @@ -180,6 +180,16 @@ tc-binutils_apply_patches() {
13 eend $?
14 done
15 fi
16 +
17 + # fix emulations issues if possible #580614
18 + if [[ -e ${FILESDIR}/binutils-configure-target.patch ]] ; then
19 + einfo "Fixing emulations issues in configure target files"
20 + ebegin " Updating ld/configure.tgt"
21 + patch "ld/configure.tgt" "${FILESDIR}"/binutils-configure-target.patch >& "${T}"/configure-target-patch.log \
22 + || eerror "Please file a bug about this"
23 + eend $?
24 + fi
25 +
26 # fix conflicts with newer glibc #272594
27 if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
28 sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
29 diff --git a/sys-devel/binutils/files/binutils-configure-target.patch b/sys-devel/binutils/files/binutils-configure-target.patch
30 new file mode 100644
31 index 0000000..0cd8778
32 --- /dev/null
33 +++ b/sys-devel/binutils/files/binutils-configure-target.patch
34 @@ -0,0 +1,18 @@
35 +--- ld/configure.tgt.orig 2016-05-15 07:49:39.661039407 +0000
36 ++++ ld/configure.tgt 2016-05-15 08:15:24.441045822 +0000
37 +@@ -586,10 +586,13 @@
38 + esac
39 + case "${targ}" in
40 + powerpc*le-*)
41 +- for z in targ_emul targ_extra_emuls targ_extra_libpath targ64_extra_emuls targ64_extra_libpath
42 ++ for z in targ_extra_emuls targ_extra_libpath targ64_extra_emuls targ64_extra_libpath
43 + do
44 +- eval ${z}=\"`eval echo \\$${z} | sed -e 's/ppc/lppc/g'`\"
45 ++ eval ${z}+=\" `eval echo \\$${z} | sed -e 's/ppc/lppc/g'`\"
46 + done
47 ++ eval targ_extra_emuls+=\" \$targ_emul\"
48 ++ eval targ_emul=\"`eval echo \\$targ_emul | sed -e 's/ppc/lppc/g'`\"
49 ++
50 + esac ;;
51 + powerpc-*-nto*) targ_emul=elf32ppcnto ;;
52 + powerpcle-*-nto*) targ_emul=elf32lppcnto ;;
53 --
54 2.7.3