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

            Bug ID: 122535
           Summary: PowerPC: --with-long-double-64 ignored during
                    configure
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: kishan at gcc dot gnu.org
          Reporter: kishan at gcc dot gnu.org
                CC: jakub at redhat dot com, jeffreyalaw at gmail dot com,
                    jskumari at gcc dot gnu.org, mmatti at linux dot 
vnet.ibm.com,
                    pinskia at gcc dot gnu.org, rguenth at gcc dot gnu.org,
                    segher at kernel dot crashing.org
  Target Milestone: ---
            Target: power64*

This bug is created just to map with a patch
https://inbox.sourceware.org/gcc-patches/[email protected]/


When configuring GCC for PowerPC with --with-long-double-64, the option gets
completely ignored.
No matter what you specify, the compiler still defaults to 128-bit long double.


Test case
=========

#include <stdlib.h>
int main() {
  if (sizeof(long double) == 8) return 8;
  if (sizeof(long double) == 16) return 16;
  return 0;
}

$ ./configure --prefix=/path/to/install --enable-languages=c,c++
--disable-bootstrap \
  --disable-libsanitizer --disable-multilib --enable-checking=release
--with-long-double-64
$ make -j
$ ./xgcc -B./ -o test test.c
$ ./test; echo $?

Expected result:
8 (long double = 64-bit)

Actual result:
16 (long double = 128-bit)

--with-long-double-64 is mentioned in install.texi, but configure.ac never
actually checks for it.

The logic only exists for --with-long-double-128 and defaults based on glibc
version ≥ 2.4.

Reply via email to