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

            Bug ID: 97543
           Summary: powerpc64le: libgcc has unexpected long double in
                    .gnu_attribute
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tuliom at ascii dot art.br
  Target Milestone: ---

Alpine Linux uses musl as C Library.
musl only supports long double as IEEE binary64.
It does not support IBM long double.

In this scenario, building gcc with --disable-multilib --with-long-double-64
still creates a libgcc with a .gnu_attribute pointing to IBM long double,
causing unnecessary link time warnings.

Reproduced as:

$ cat test.c
#include <stdio.h>
#include <stdint.h>
int
main()
{
  long double a = 2.0;
  __int128 b = 8;
  printf("sizeof(long double) = %ld\n", sizeof(long double));
  printf("a * b = %Lf\n", a * (long double) b);
  return 0;
}
$ gcc test.c && ./a.out
/usr/lib/gcc/powerpc64le-alpine-linux-musl/10.2.0/../../../../powerpc64le-alpine-linux-musl/bin/ld:
/tmp/ccmCAapA.o uses 64-bit long double,
/usr/lib/gcc/powerpc64le-alpine-linux-musl/10.2.0/../../../../lib/libgcc_s.so.1
uses 128-bit long double
/usr/lib/gcc/powerpc64le-alpine-linux-musl/10.2.0/../../../../powerpc64le-alpine-linux-musl/bin/ld:
/tmp/ccmCAapA.o uses 64-bit long double,
/usr/lib/gcc/powerpc64le-alpine-linux-musl/10.2.0/../../../../lib/libgcc_s.so.1
uses 128-bit long double
sizeof(long double) = 8
a * b = 16.000000
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc64le-alpine-linux-musl/10.2.0/lto-wrapper
Target: powerpc64le-alpine-linux-musl
Configured with: /home/devel/aports/main/gcc/src/gcc-10.2.0/configure
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--build=powerpc64le-alpine-linux-musl --host=powerpc64le-alpine-linux-musl
--target=powerpc64le-alpine-linux-musl --with-pkgversion='Alpine 10.2.0'
--enable-checking=release --disable-fixed-point --disable-libstdcxx-pch
--disable-multilib --disable-nls --disable-werror --disable-symvers
--enable-__cxa_atexit --enable-default-pie --enable-default-ssp
--enable-cloog-backend --enable-languages=c,c++,objc,go,fortran,ada
--with-abi=elfv2 --enable-secureplt --enable-decimal-float=no
--enable-targets=powerpcle-linux --with-long-double-64 --disable-libquadmath
--disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer
--enable-shared --enable-threads --enable-tls --with-system-zlib
--with-linker-hash-style=gnu
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (Alpine 10.2.0)

Reply via email to