1) We faced unable read SONAME from ${lib} when emerge below packages platform pacakge elibtoolized ppc64le app-text/opensp no ppc64le dev-libs/expat yes ppc64le net-firewall/iptables yes ppc64le net-libs/libmnl no ppc64le sys-apps/acl yes ppc64le sys-apps/attr yes ppc64le sys-libs/gdbm yes ppc64le sys-process/procps no
2) The problem is due to the wrong $LD="ld -m elf64ppc" when link. This patch sets $LD="ld -m elf64lppc" in m4/libtool.m4 on ppc64le. 3) Also patched m4/libtool.m4 in libtool-2.4.6. Reported the bug[1] in libtool upstream, Once the upstream fixed the libtool problem for ppc64le, we can pull back from the upstream. [1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23348 Signed-off-by: Leno Hou <leno...@gmail.com> CC: Mike Frysinger <vap...@gentoo.org> --- eclass/ELT-patches/ppc64le/2.4.2 | 26 ++++++++++++++++++++++ eclass/ELT-patches/ppc64le/2.4.4 | 15 +++++++++++++ eclass/ELT-patches/ppc64le/2.4.6 | 15 +++++++++++++ eclass/libtool.eclass | 6 ++++- .../files/libtool-2.4.6-link-with-ppc64le.patch | 15 +++++++++++++ sys-devel/libtool/libtool-2.4.6-r1.ebuild | 1 + sys-devel/libtool/libtool-2.4.6-r2.ebuild | 1 + sys-devel/libtool/libtool-2.4.6.ebuild | 1 + 8 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 eclass/ELT-patches/ppc64le/2.4.2 create mode 100644 eclass/ELT-patches/ppc64le/2.4.4 create mode 100644 eclass/ELT-patches/ppc64le/2.4.6 create mode 100644 sys-devel/libtool/files/libtool-2.4.6-link-with-ppc64le.patch diff --git a/eclass/ELT-patches/ppc64le/2.4.2 b/eclass/ELT-patches/ppc64le/2.4.2 new file mode 100644 index 0000000..d61f6c3 --- /dev/null +++ b/eclass/ELT-patches/ppc64le/2.4.2 @@ -0,0 +1,26 @@ +--- m4/libtool.m4.orig 2016-04-21 16:50:01.118444710 +0000 ++++ m4/libtool.m4 2016-04-21 16:52:39.419906716 +0000 +@@ -1329,6 +1329,9 @@ + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; ++ ppc64le-*linux*|powerpc64le-*linux*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; +@@ -1345,9 +1348,12 @@ + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ powerpc-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; ++ powerpcle-*linux*|powerpc64le-*linux*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; diff --git a/eclass/ELT-patches/ppc64le/2.4.4 b/eclass/ELT-patches/ppc64le/2.4.4 new file mode 100644 index 0000000..e3e4637 --- /dev/null +++ b/eclass/ELT-patches/ppc64le/2.4.4 @@ -0,0 +1,15 @@ +--- m4/libtool.m4.orig 2016-04-21 16:59:06.039629474 +0000 ++++ m4/libtool.m4 2016-04-21 17:00:10.564264157 +0000 +@@ -1386,10 +1386,10 @@ + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- powerpcle-*linux*) ++ powerpcle-*linux*|powerpc64le-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; +- powerpc-*linux*) ++ powerpc-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) diff --git a/eclass/ELT-patches/ppc64le/2.4.6 b/eclass/ELT-patches/ppc64le/2.4.6 new file mode 100644 index 0000000..711ceb2 --- /dev/null +++ b/eclass/ELT-patches/ppc64le/2.4.6 @@ -0,0 +1,15 @@ +--- m4/libtool.m4.orig 2016-04-21 16:42:22.170586778 +0000 ++++ m4/libtool.m4 2016-04-21 16:43:41.571195049 +0000 +@@ -1417,10 +1417,10 @@ + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- powerpcle-*linux*) ++ powerpcle-*linux*|powerpc64le-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; +- powerpc-*linux*) ++ powerpc-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass index 47ef812..9f56c20 100644 --- a/eclass/libtool.eclass +++ b/eclass/libtool.eclass @@ -144,7 +144,7 @@ elibtoolize() { local deptoremove= local do_shallow="no" local force="false" - local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed target-nm" + local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed target-nm ppc64le" for x in "$@" ; do case ${x} in @@ -417,6 +417,10 @@ elibtoolize() { ELT_walk_patches "${d}/configure" "${p}" ret=$? ;; + ppc64le) + ELT_walk_patches "${d}/configure" "${p}" + ret=$? + ;; *) # ltmain.sh patches are applied above ;; diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-with-ppc64le.patch b/sys-devel/libtool/files/libtool-2.4.6-link-with-ppc64le.patch new file mode 100644 index 0000000..7cba5ba --- /dev/null +++ b/sys-devel/libtool/files/libtool-2.4.6-link-with-ppc64le.patch @@ -0,0 +1,15 @@ +--- m4/libtool.m4.orig 2016-04-22 15:23:26.197427774 +0000 ++++ m4/libtool.m4 2016-04-22 15:24:36.977428596 +0000 +@@ -1417,10 +1417,10 @@ + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- powerpcle-*linux*) ++ powerpcle-*linux*|powerpc64le-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; +- powerpc-*linux*) ++ powerpc-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) diff --git a/sys-devel/libtool/libtool-2.4.6-r1.ebuild b/sys-devel/libtool/libtool-2.4.6-r1.ebuild index 677db33..671a07d 100644 --- a/sys-devel/libtool/libtool-2.4.6-r1.ebuild +++ b/sys-devel/libtool/libtool-2.4.6-r1.ebuild @@ -48,6 +48,7 @@ src_prepare() { epatch "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105 epatch "${FILESDIR}"/${P}-fuse-ld.patch + epatch "${FILESDIR}"/${PN}-2.4.6-link-with-ppc64le.patch #580792 pushd libltdl >/dev/null AT_NOELIBTOOLIZE=yes eautoreconf popd >/dev/null diff --git a/sys-devel/libtool/libtool-2.4.6-r2.ebuild b/sys-devel/libtool/libtool-2.4.6-r2.ebuild index 7e8b7ef..e7cee2a 100644 --- a/sys-devel/libtool/libtool-2.4.6-r2.ebuild +++ b/sys-devel/libtool/libtool-2.4.6-r2.ebuild @@ -53,6 +53,7 @@ src_prepare() { epatch "${FILESDIR}"/${P}-libtoolize-slow.patch epatch "${FILESDIR}"/${P}-libtoolize-delay-help.patch epatch "${FILESDIR}"/${P}-sed-quote-speedup.patch #542252 + epatch "${FILESDIR}"/${PN}-2.4.6-link-with-ppc64le.patch #580792 pushd libltdl >/dev/null AT_NOELIBTOOLIZE=yes eautoreconf popd >/dev/null diff --git a/sys-devel/libtool/libtool-2.4.6.ebuild b/sys-devel/libtool/libtool-2.4.6.ebuild index 71a9b47..ca0265e 100644 --- a/sys-devel/libtool/libtool-2.4.6.ebuild +++ b/sys-devel/libtool/libtool-2.4.6.ebuild @@ -47,6 +47,7 @@ src_prepare() { use vanilla && return 0 epatch "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105 + epatch "${FILESDIR}"/${PN}-2.4.6-link-with-ppc64le.patch #580792 pushd libltdl >/dev/null AT_NOELIBTOOLIZE=yes eautoreconf popd >/dev/null -- 2.7.3