https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93157

            Bug ID: 93157
           Summary: gcc should use -mabi=elfv2 on powerpc64-*-linux-*musl*
                    target by default.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gyakovlev at gentoo dot org
  Target Milestone: ---

encountered with 9.2.0 but I think all versions affected.


By default at configuration time gcc assumes that powerpc64-*-linux-* (big
endian ppc64) targets use ELFv1 ABI, and ELFv2 abi on little-endian.

But musl libc does not support ELFv1 at all on either endian ppc64.

Their INSTALL file clearly mentions:
* PowerPC64
    * Both little and big endian variants are supported
    * Compiler toolchain must provide 64-bit long double, not IBM
      double-double or IEEE quad
    * Compiler toolchain must use the new (ELFv2) ABI regardless of
      whether it is for little or big endian

I think gcc configuration should default to --with-abi=elfv2 on
powerpc64-*-linux-*musl* target.


 * Configuring GCC with:
 *      --host=powerpc64-unknown-linux-gnu
 *      --target=powerpc64-unknown-linux-musl
 *      --build=powerpc64-unknown-linux-gnu



after that musl fails
checking whether linker accepts -lgcc_eh... yes
using compiler runtime libraries: -lgcc -lgcc_eh
checking preprocessor condition _CALL_ELF == 2... false
./configure: error: unsupported powerpc64 ABI

Reply via email to