Gentoo Archives: gentoo-dev

From: Leno Hou <lenohou@×××××.com>
To: gentoo-dev@l.g.o, blueness@g.o, toolchain@g.o
Cc: Leno Hou <lenohou@×××××.com>, Mike Frysinger <vapier@g.o>
Subject: [gentoo-dev][PATCH v2 1/2] eclass/libtool: fix unable read SONAME for ppc64le #580792
Date: Fri, 22 Apr 2016 07:44:17
Message-Id: 1461311042-25519-1-git-send-email-lenohou@gmail.com
1 1) We faced unable read SONAME from ${lib} when emerge below pacakges
2 platform pacakge
3 ppc64le app-text/opensp
4 ppc64le dev-libs/expat
5 ppc64le net-firewall/iptables
6 ppc64le net-libs/libmnl
7 ppc64le sys-apps/acl
8 ppc64le sys-apps/attr
9 ppc64le sys-libs/gdbm
10 ppc64le sys-process/procps
11
12 2) The problem is due to the wrong $LD="ld -m elf64ppc" when link.
13 This patch sets $LD="ld -m elf64lppc" in m4/libtool.m4 on ppc64le.
14
15 Signed-off-by: Leno Hou <lenohou@×××××.com>
16 CC: Mike Frysinger <vapier@g.o>
17 ---
18 eclass/ELT-patches/ppc64le/2.4.2 | 26 ++++++++++++++++++++++++++
19 eclass/ELT-patches/ppc64le/2.4.4 | 15 +++++++++++++++
20 eclass/ELT-patches/ppc64le/2.4.6 | 15 +++++++++++++++
21 eclass/libtool.eclass | 6 +++++-
22 4 files changed, 61 insertions(+), 1 deletion(-)
23 create mode 100644 eclass/ELT-patches/ppc64le/2.4.2
24 create mode 100644 eclass/ELT-patches/ppc64le/2.4.4
25 create mode 100644 eclass/ELT-patches/ppc64le/2.4.6
26
27 diff --git a/eclass/ELT-patches/ppc64le/2.4.2 b/eclass/ELT-patches/ppc64le/2.4.2
28 new file mode 100644
29 index 0000000..1a22432
30 --- /dev/null
31 +++ b/eclass/ELT-patches/ppc64le/2.4.2
32 @@ -0,0 +1,26 @@
33 +--- m4/libtool.m4.orig 2016-04-21 16:50:01.118444710 +0000
34 ++++ m4/libtool.m4 2016-04-21 16:52:39.419906716 +0000
35 +@@ -1329,6 +1329,9 @@
36 + ppc64-*linux*|powerpc64-*linux*)
37 + LD="${LD-ld} -m elf32ppclinux"
38 + ;;
39 ++ ppc64le-*linux*|powerpc64le-*linux*)
40 ++ LD="${LD-ld} -m elf32lppclinux"
41 ++ ;;
42 + s390x-*linux*)
43 + LD="${LD-ld} -m elf_s390"
44 + ;;
45 +@@ -1345,9 +1348,12 @@
46 + x86_64-*linux*)
47 + LD="${LD-ld} -m elf_x86_64"
48 + ;;
49 +- ppc*-*linux*|powerpc*-*linux*)
50 ++ ppc64-*linux*|powerpc64-*linux*)
51 + LD="${LD-ld} -m elf64ppc"
52 + ;;
53 ++ ppc64le-*linux*|powerpc64le-*linux*)
54 ++ LD="${LD-ld} -m elf64lppc"
55 ++ ;;
56 + s390*-*linux*|s390*-*tpf*)
57 + LD="${LD-ld} -m elf64_s390"
58 + ;;
59 diff --git a/eclass/ELT-patches/ppc64le/2.4.4 b/eclass/ELT-patches/ppc64le/2.4.4
60 new file mode 100644
61 index 0000000..e3e4637
62 --- /dev/null
63 +++ b/eclass/ELT-patches/ppc64le/2.4.4
64 @@ -0,0 +1,15 @@
65 +--- m4/libtool.m4.orig 2016-04-21 16:59:06.039629474 +0000
66 ++++ m4/libtool.m4 2016-04-21 17:00:10.564264157 +0000
67 +@@ -1386,10 +1386,10 @@
68 + x86_64-*linux*)
69 + LD="${LD-ld} -m elf_x86_64"
70 + ;;
71 +- powerpcle-*linux*)
72 ++ powerpcle-*linux*|powerpc64le-*linux*)
73 + LD="${LD-ld} -m elf64lppc"
74 + ;;
75 +- powerpc-*linux*)
76 ++ powerpc-*linux*|powerpc64-*linux*)
77 + LD="${LD-ld} -m elf64ppc"
78 + ;;
79 + s390*-*linux*|s390*-*tpf*)
80 diff --git a/eclass/ELT-patches/ppc64le/2.4.6 b/eclass/ELT-patches/ppc64le/2.4.6
81 new file mode 100644
82 index 0000000..711ceb2
83 --- /dev/null
84 +++ b/eclass/ELT-patches/ppc64le/2.4.6
85 @@ -0,0 +1,15 @@
86 +--- m4/libtool.m4.orig 2016-04-21 16:42:22.170586778 +0000
87 ++++ m4/libtool.m4 2016-04-21 16:43:41.571195049 +0000
88 +@@ -1417,10 +1417,10 @@
89 + x86_64-*linux*)
90 + LD="${LD-ld} -m elf_x86_64"
91 + ;;
92 +- powerpcle-*linux*)
93 ++ powerpcle-*linux*|powerpc64le-*linux*)
94 + LD="${LD-ld} -m elf64lppc"
95 + ;;
96 +- powerpc-*linux*)
97 ++ powerpc-*linux*|powerpc64-*linux*)
98 + LD="${LD-ld} -m elf64ppc"
99 + ;;
100 + s390*-*linux*|s390*-*tpf*)
101 diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass
102 index 47ef812..9f56c20 100644
103 --- a/eclass/libtool.eclass
104 +++ b/eclass/libtool.eclass
105 @@ -144,7 +144,7 @@ elibtoolize() {
106 local deptoremove=
107 local do_shallow="no"
108 local force="false"
109 - local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed target-nm"
110 + local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed target-nm ppc64le"
111
112 for x in "$@" ; do
113 case ${x} in
114 @@ -417,6 +417,10 @@ elibtoolize() {
115 ELT_walk_patches "${d}/configure" "${p}"
116 ret=$?
117 ;;
118 + ppc64le)
119 + ELT_walk_patches "${d}/configure" "${p}"
120 + ret=$?
121 + ;;
122 *)
123 # ltmain.sh patches are applied above
124 ;;
125 --
126 2.7.3

Replies