bug#23348: [m4/libtool.m4] linker error for powerpc64le-unknown-linux-gnu

Mike Frysinger <[email protected]> Sat, 13 Jan 2024 22:19:29 -0500
Newsgroups gmane.comp.gnu.libtool.bugs
Message-ID <ZaNSwUTkI6ckDyW6@vapier>
On 24 Apr 2016 00:46, Leno Hou wrote:
>    3) But when I set CHOST="powerpc64le-unkown-linux-gnu" in Gentoo and
> execute aclocal, automake, libtoolize --copy --force, autoconf. When I
> glance in the latest m4/libtool.m4 :

i took another look at this patch.  it isn't making sense to me, and your
commit message doesn't have an explanation as to why you need it.  the only
thing you've written is "i looked at the file, and it looks incorrect".

do you have a build failure/log somewhere to share ?

> if AC_TRY_EVAL(ac_compile); then
>    case `/usr/bin/file conftest.o` in
>      *32-bit*)
>        case $host in
> ...
>          powerpc64le-*linux*)
>            LD="${LD-ld} -m elf32lppclinux"
>            ;;
>          powerpc64-*linux*)
>            LD="${LD-ld} -m elf32ppclinux"
>            ;;
> ...
>      *64-bit*)
>        case $host in
> ...
>          powerpcle-*linux*)
>            LD="${LD-ld} -m elf64lppc"
>            ;;
>          powerpc-*linux*)
>            LD="${LD-ld} -m elf64ppc"
>            ;;
> ...
> 
> seems linked to $LD='$LD-ld -m elf64ppc' and failed to compile packages.

this code is really for multilib situations.  it's only needed when you want
to compile for a diff ABI than the toolchain is defaulting to.

so if --host=powerpc64le-linux-gnu, it should produce 64-bit binaries, and
libtool doesn't have to do anything.  that's why powerpc64 isn't listed in
the 64-bit section.

adding it here would only matter if your powerpc64le-linux-gnu is producing
32-bit binaries by default, and that doesn't make sense.  and as you can
see from the arch list in this section, no other target does this.
-mike
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmWjUsEACgkQQWM7n+g3
9YGj1w//f1xgHcctSBBY+gERHgKcsIU8YHa/Nd1d0msd+9gusFIByn0qpm6/TdOw
HlCAXS4Zdx/jf0inl5dNb+O1u4j+EuUsUJETZM9+MBpABrzNXuuAUPyQwZmpH/we
Nw5HPgly8eFnmNkIsTNszqfQgzKaoS6YWCbdeaxbkFO3SRO9iVOR3c4GGICRfiJn
l2hvT2c4Q24gYty/glB7cSW/8eAysM9tjr7ahc0nT+r748gFEqzr5KslJXi4tMD6
k28OAZ1AYg9H2zhi9L313fbTJ0tCdDyAay4YE33vP5liMNh2D5HOl1gnqPxLZHbd
CHAngHKL0sqgcNMaiz9zbaOontcsxTAIX4smCrbfjZC3v7lskDB9NOBRPL9NygHS
PgScUy8uhS1kSTx8BIqfa1y7cT3SXdQklO9abr4zOQIsQ8Wqa3ezpq957U807gJH
myoIwn2BIGhbTQCI7CiMeP0Gufj3eRGPh4qPkAshUNTaJ3iGQIv75ls+pUhcgcqG
tlwfyyZAm1ckFj/TWjePUO3z8UGcBNgWTa2AYkmxQ3vvV8wTbU85CPdpspCNX5Zw
GP2TATXDVPm2rDvwOvYLB3kPyIVaheDhg/mrVlpXRX8JuUskHwEW3ojojm4CQ8Nk
qHtqX2q5Ea01huTf1Fp8Pw720nlTY8OzQOol79+TzNT0uhVK9Sg=
=/2EV
-----END PGP SIGNATURE-----