From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by sourceware.org (Postfix) with ESMTPS id 863663951885; Tue, 1 Dec 2020 21:10:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 863663951885 Received: by mail-wr1-x442.google.com with SMTP id u12so5036420wrt.0; Tue, 01 Dec 2020 13:10:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=cUWxssMxHbpPdWd15G8KOP/U63t0wgWdE/v9aNXKcFs=; b=ANQyGzOsof2UN3g5NvLzX/cs+iAtYvuOhyC3qXjyVXzqHwKsr2ioRAdNk9iI8XWItd pT9FCkkbIUX7Vh+bVoyo7nnfsFtOZgr7fjNAYI5blDM3bpoHHFfiCt6i0h3uDTMzNyEC eip8GOkkswQn0o1Mk31IoT5FHzqZr/OUN1k4oLw0ejI4xT8Zd6jEn8iAI6KjMdmaSQ/0 FeDsjfYOPNFwi9Ws2JGTqBhkD3EhFz59iR8+69NcRZECUAIiOgYYGi5BUMb5bpMVBUcm yO4eHkmkFAZeFXH1V11ljiUK3JyVGjJDjNBws5eNhrqn/2bhtANAe6WmucGb2LPMa4Nq bF/g== X-Gm-Message-State: AOAM533LEp89hMkIvcB3X19T+IxB52+Af/+7+1WdW1qLerlrQf0X9mqF Pc9t4YPDUMkaeJKywqtPRgJoszjMkv7YTsxLmdU= X-Google-Smtp-Source: ABdhPJw7ZmzIPpZMDMgUjdNvxQS5vs4nSggCfoYJMlBjGptW+9BwVHjqkiZhNlm5iKn/Mp1uu/kbvpSYE2MRCl6g398= X-Received: by 2002:adf:f651:: with SMTP id x17mr6252184wrp.185.1606857041845; Tue, 01 Dec 2020 13:10:41 -0800 (PST) MIME-Version: 1.0 References: <20201111215001.GA231697@redhat.com> <20201130213029.GA10782@ibm-toto.the-meissners.org> <20201201151011.GA2761400@redhat.com> <20201201160430.GL2309743@redhat.com> <20201201191042.GB7198@ibm-toto.the-meissners.org> In-Reply-To: <20201201191042.GB7198@ibm-toto.the-meissners.org> From: Jonathan Wakely Date: Tue, 1 Dec 2020 21:10:30 +0000 Message-ID: Subject: Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format To: Michael Meissner , Jonathan Wakely , "libstdc++" , gcc-patches , Bill Schmidt , David Edelsohn , Segher Boessenkool , Peter Berner Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_MANYTO, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2020 21:10:45 -0000 On Tue, 1 Dec 2020 at 19:13, Michael Meissner via Libstdc++ wrote: > > On Tue, Dec 01, 2020 at 04:04:30PM +0000, Jonathan Wakely wrote: > > On 01/12/20 15:10 +0000, Jonathan Wakely wrote: > > >On 30/11/20 16:30 -0500, Michael Meissner via Libstdc++ wrote: > > >>Jonathan, could you send a fresh set of patches (or at least replacem= ents)? I > > >>tried installing the patches on a master branch I checked out this mo= rning, and > > >>I got two rejects: > > > > > >I don't understand why those chunks failed, but I'll rebase and send a > > >new patch ASAP. > > > > Here's the rebased patch, with regenerated autoconf files and a fix > > for the header. I'd changed it since sending > > the previous patch, and broke the "there's more than one long double" > > case (i.e. the _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT case). > > Unfortunately this patch DOES NOT work at all. > > If I build a compiler with the configure option: > --with-long-double-format=3Dieee > > And I compile this simple program: > > #include > > int main(int argc, char *argv[], char *envp[]) > { > std::cout << "Hello World!\n"; > return 0; > } > > I get all of these errors: It works fine for me (see below). I think your symptoms are due to using a glibc that doesn't support the new long double, and so libstdc++ support for it is also disabled. You need at least glibc 2.32 for the libstdc++ changes to be enabled. [test@ibm-p9b-30 build-ieee128]$ rpm -q glibc glibc-2.32-2.fc33.ppc64le [test@ibm-p9b-30 tmp]$ cat hello.C #include int main(int argc, char *argv[], char *envp[]) { std::cout << "Hello World!\n"; return 0; } [test@ibm-p9b-30 tmp]$ ~/gcc/ieee128/bin/g++ hello.C -Wl,-rpath,$HOME/gcc/ieee128/lib64 -v Using built-in specs. COLLECT_GCC=3D/home/test/gcc/ieee128/bin/g++ COLLECT_LTO_WRAPPER=3D/home/test/gcc/ieee128/libexec/gcc/powerpc64le-unknow= n-linux-gnu/11.0.0/lto-wrapper Target: powerpc64le-unknown-linux-gnu Configured with: ../gcc/configure --prefix=3D/home/test/gcc/ieee128/ --enable-libstdcxx-debug --disable-bootstrap --disable-multilib --disable-libvtv --with-system-zlib --without-isl --with-long-double-format=3Dieee --enable-languages=3Dc,c++ : (reconfigured) ../gcc/configure --prefix=3D/home/test/gcc/ieee128/ --enable-libstdcxx-debug --disable-bootstrap --disable-multilib --disable-libvtv --with-system-zlib --without-isl --with-long-double-format=3Dieee --enable-languages=3Dc,c++ : (reconfigured) ../gcc/configure --prefix=3D/home/test/gcc/ieee128/ --enable-libstdcxx-debug --disable-bootstrap --disable-multilib --disable-libvtv --with-system-zlib --without-isl --with-long-double-format=3Dieee --enable-languages=3Dc,c++,lto --no-create --no-recursion Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.0.0 20201201 (experimental) (GCC) COLLECT_GCC_OPTIONS=3D'-v' '-shared-libgcc' '-dumpdir' 'a-' /home/test/gcc/ieee128/libexec/gcc/powerpc64le-unknown-linux-gnu/11.0.0/cc1= plus -quiet -v -D_GNU_SOURCE hello.C -quiet -dumpdir a- -dumpbase hello.C -dumpbase-ext .C -version -o /tmp/cc1OWZTT.s GNU C++17 (GCC) version 11.0.0 20201201 (experimental) (powerpc64le-unknown-linux-gnu) compiled by GNU C version 10.2.1 20201016 (Red Hat 10.2.1-6), GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.1.0, isl version none GGC heuristics: --param ggc-min-expand=3D30 --param ggc-min-heapsize=3D4096 ignoring nonexistent directory "/home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0/../../= ../../powerpc64le-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0/../../.= ./../include/c++/11.0.0 /home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0/../../.= ./../include/c++/11.0.0/powerpc64le-unknown-linux-gnu /home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0/../../.= ./../include/c++/11.0.0/backward /home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0/include /usr/local/include /home/test/gcc/ieee128/include /home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0/include= -fixed /usr/include End of search list. GNU C++17 (GCC) version 11.0.0 20201201 (experimental) (powerpc64le-unknown-linux-gnu) compiled by GNU C version 10.2.1 20201016 (Red Hat 10.2.1-6), GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.1.0, isl version none GGC heuristics: --param ggc-min-expand=3D30 --param ggc-min-heapsize=3D4096 Compiler executable checksum: 868967e3eb6523a59f0ddd7cc415f672 COLLECT_GCC_OPTIONS=3D'-v' '-shared-libgcc' '-dumpdir' 'a-' as -v -a64 -mpower8 -mlittle -o /tmp/ccpF549Q.o /tmp/cc1OWZTT.s GNU assembler version 2.35 (ppc64le-redhat-linux) using BFD version version 2.35-14.fc33 COMPILER_PATH=3D/home/test/gcc/ieee128/libexec/gcc/powerpc64le-unknown-linu= x-gnu/11.0.0/:/home/test/gcc/ieee128/libexec/gcc/powerpc64le-unknown-linux-= gnu/11.0.0/:/home/test/gcc/ieee128/libexec/gcc/powerpc64le-unknown-linux-gn= u/:/home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0/:/ho= me/test/gcc/ieee128 /lib/gcc/powerpc64le-unknown-linux-gnu/ LIBRARY_PATH=3D/home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu= /11.0.0/:/home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.= 0/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/home/test/gcc/ieee1= 28/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS=3D'-v' '-shared-libgcc' '-dumpdir' 'a.' /home/test/gcc/ieee128/libexec/gcc/powerpc64le-unknown-linux-gnu/11.0.0/col= lect2 -plugin /home/test/gcc/ieee128/libexec/gcc/powerpc64le-unknown-linux-gnu/11= .0.0/liblto_plugin.so -plugin-opt=3D/home/test/gcc/ieee128/libexec/gcc/powerpc64le-unknown-linux-= gnu/11.0.0/lto-wrapper -plugin-opt=3D-fresolution=3D/tmp/cc69gZwR.res -plugin-opt=3D-pass-through=3D-lgcc_s -plugin-opt=3D-pass-through=3D-lgcc -plugin-opt=3D-pass-through=3D-lc -plugin-opt=3D-pass-through=3D-lgcc_s -plugin-opt=3D-pass-through=3D-lgcc --eh-frame-hdr -V -m elf64lppc -dynamic-linker /lib64/ld64.so.2 /lib/../lib64/crt1.o /lib/../lib64/crti.o /home/test/gcc/ieee128/lib/gcc/powerpc64le-unkno wn-linux-gnu/11.0.0/crtbegin.o -L/home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0 -L/home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0/../..= /../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/11.0.0/../..= /.. /tmp/ccpF549Q .o -rpath /home/test/gcc/ieee128/lib64 -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /home/test/gcc/ieee128/lib/gcc/powerpc64le-unknown-linux-gnu/= 11.0.0/crtend.o /lib/../lib64/crtn.o GNU ld version 2.35-14.fc33 Supported emulations: elf64lppc elf32lppc elf32lppclinux elf32lppcsim elf64ppc elf32ppc elf32ppclinux elf32ppcsim elf64bpf COLLECT_GCC_OPTIONS=3D'-v' '-shared-libgcc' '-dumpdir' 'a.' [test@ibm-p9b-30 tmp]$ ldd a.out linux-vdso64.so.1 (0x00007fff8c890000) libstdc++.so.6 =3D> /home/test/gcc/ieee128/lib64/libstdc++.so.6 (0x00007fff8c5b0000) libm.so.6 =3D> /lib64/libm.so.6 (0x00007fff8c470000) libgcc_s.so.1 =3D> /home/test/gcc/ieee128/lib64/libgcc_s.so.1 (0x00007fff8c430000) libc.so.6 =3D> /lib64/libc.so.6 (0x00007fff8c210000) /lib64/ld64.so.2 (0x00007fff8c8b0000) [test@ibm-p9b-30 tmp]$ ./a.out Hello World!