From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from franke.ms (serveronline.org [136.243.37.185]) by sourceware.org (Postfix) with ESMTPS id 29D543858C52 for ; Mon, 10 Apr 2023 14:15:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29D543858C52 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=franke.ms Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=franke.ms Received: from ZETRA (null [185.191.249.122]) by serveronline.org (BEJY V1.6.12-SNAPSHOT (c) 2000-2021 by BebboSoft, Stefan "Bebbo" Franke, all rights reserved) with SMTP id 1876b858971973c7971f1d4151f from stefan@franke.ms for gcc-help@gcc.gnu.org; Mon, 10 Apr 2023 15:15:26 +0100 Reply-To: From: "Stefan Franke" To: "'Kalamatee'" , "'Jonathan Wakely'" Cc: "'gcc-help'" References: In-Reply-To: Subject: AW: Problem porting gcc 12 Date: Mon, 10 Apr 2023 16:15:26 +0200 Message-ID: <001301d96bb6$e61eac10$b25c0430$@franke.ms> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJOhAy1aThoLmwbTiATW0yYWd3e/gEAgY0pAkYeIdCuIDCOcA== Content-Language: de X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > -----Urspr=C3=BCngliche Nachricht----- > Von: Gcc-help Im > Auftrag von Kalamatee via Gcc-help > Gesendet: Montag, 10. April 2023 14:34 > An: Jonathan Wakely > Cc: gcc-help > Betreff: Re: Problem porting gcc 12 >=20 > Thanks, I'll check that out. >=20 > On Mon, 10 Apr 2023, 13:15 Jonathan Wakely, > wrote: >=20 > > > > > > On Mon, 10 Apr 2023, 12:34 Kalamatee via Gcc-help, > > > > wrote: > > > >> Hi, > >> > >> When im trying to build gcc12, I get the following error -: > >> > >> /bin/bash ../../libtool --tag CXX --tag disable-shared = --mode=3Dcompile > >> /home/test/gcc12/./gcc/xgcc -shared-libgcc -B/home/test/gcc12/./gcc > >> -nostdinc++ -L/home/test/gcc12/x86_64-aros/libstdc++-v3/src > >> -L/home/test/gcc12/x86_64-aros/libstdc++-v3/src/.libs > >> -L/home/test/gcc12/x86_64-aros/libstdc++-v3/libsupc++/.libs > >> > >> = -B/home/kalam/builds/pc-x86_64-gcc12-clean/bin/linux-x86_64/tools/cro > >> sstools/x86_64-aros/bin/ > >> > >> = -B/home/kalam/builds/pc-x86_64-gcc12-clean/bin/linux-x86_64/tools/cro > >> sstools/x86_64-aros/lib/ > >> -isystem > >> > >> = /home/kalam/builds/pc-x86_64-gcc12-clean/bin/linux-x86_64/tools/cross > >> tools/x86_64-aros/include > >> -isystem > >> > >> /home/kalam/builds/pc-x86_64-gcc12-clean/bin/linux- > x86_64/tools/crosstools/x86_64-aros/sys-include > >> -I/home/test/gcc12/src/gcc-12.2.0/libstdc++-v3/../libgcc > >> -I/home/test/gcc12/x86_64-aros/libstdc++-v3/include/x86_64-aros > >> -I/home/test/gcc12/x86_64-aros/libstdc++-v3/include > >> -I/home/test/gcc12/src/gcc-12.2.0/libstdc++-v3/libsupc++ = -std=3Dgnu++17 > >> -nostdinc++ -fno-implicit-templates -Wall -Wextra = -Wwrite-strings > >> -Wcast-qual -Wabi=3D2 -fdiagnostics-show-location=3Donce > >> -ffunction-sections -fdata-sections > >> -frandom-seed=3Dfloating_from_chars.lo > >> -fimplicit-templates > >> -g -O2 -c -o floating_from_chars.lo > >> > >> = /home/test/gcc12/src/gcc-12.2.0/libstdc++-v3/src/c++17/floating_from_ > >> chars.cc > >> libtool: compile: /home/test/gcc12/./gcc/xgcc -shared-libgcc > >> -B/home/test/gcc12/./gcc -nostdinc++ > >> -L/home/test/gcc12/x86_64-aros/libstdc++-v3/src > >> -L/home/test/gcc12/x86_64-aros/libstdc++-v3/src/.libs > >> -L/home/test/gcc12/x86_64-aros/libstdc++-v3/libsupc++/.libs > >> > >> = -B/home/kalam/builds/pc-x86_64-gcc12-clean/bin/linux-x86_64/tools/cro > >> sstools/x86_64-aros/bin/ > >> > >> = -B/home/kalam/builds/pc-x86_64-gcc12-clean/bin/linux-x86_64/tools/cro > >> sstools/x86_64-aros/lib/ > >> -isystem > >> > >> = /home/kalam/builds/pc-x86_64-gcc12-clean/bin/linux-x86_64/tools/cross > >> tools/x86_64-aros/include > >> -isystem > >> > >> = /home/kalam/builds/pc-x86_64-gcc12-clean/bin/linux-x86_64/tools/cross > >> tools/x86_64-aros/sys-include > >> -I/home/test/gcc12/src/gcc-12.2.0/libstdc++-v3/../libgcc > >> -I/home/test/gcc12/x86_64-aros/libstdc++-v3/include/x86_64-aros > >> -I/home/test/gcc12/x86_64-aros/libstdc++-v3/include > >> -I/home/test/gcc12/src/gcc-12.2.0/libstdc++-v3/libsupc++ = -std=3Dgnu++17 > >> -nostdinc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings > >> -Wcast-qual -Wabi=3D2 -fdiagnostics-show-location=3Donce > >> -ffunction-sections -fdata-sections > >> -frandom-seed=3Dfloating_from_chars.lo -fimplicit-templates -g -O2 = -c > >> > >> = /home/test/gcc12/src/gcc-12.2.0/libstdc++-v3/src/c++17/floating_from_ > >> chars.cc > >> -o floating_from_chars.o > >> In file included from > >> > >> /home/test/gcc12/src/gcc-12.2.0/libstdc++- > v3/src/c++17/floating_from_chars.cc:77: > >> > >> /home/test/gcc12/src/gcc-12.2.0/libstdc++- > v3/src/c++17/fast_float/fast_float.h: > >> In function 'void > >> {anonymous}::fast_float::round_nearest_tie_even(adjusted_mantissa&, > >> int32_t, callback)': > >> > >> /home/test/gcc12/src/gcc-12.2.0/libstdc++- > v3/src/c++17/fast_float/fast_float.h:2500:12: > >> error: 'UINT64_MAX' was not declared in this scope > >> 2500 | mask =3D UINT64_MAX; > >> | ^~~~~~~~~~ > >> > >> /home/test/gcc12/src/gcc-12.2.0/libstdc++- > v3/src/c++17/fast_float/fast_float.h:1:1: > >> note: 'UINT64_MAX' is defined in header ''; did you forget > >> to '#include '? > >> +++ |+#include > >> 1 | // fast_float by Daniel Lemire > >> make[7]: *** [Makefile:585: floating_from_chars.lo] Error 1 > >> > >> I can see from the preprocessor output, the necessary header is > >> included - but is protected with #if !defined(__cplusplus) || > >> defined(__STDC_LIMIT_MACROS) #endif > >> > >> And since the compiler doesn't define __STDC_LIMIT_MACROS on the > >> command line, or in the source file - it is resolved. > >> > >> I'm not sure though, where is the correct place to fix this? > >> > > > > > > In the C library. The C++ standard is very clear that > > __STDC_LIMIT_MACROS has no meaning whatsoever in C++. The C = library's > > must define those macros unconditionally for C++. The C99 > > standard said the macros are required for C++, so some C libraries > > follow that rule, but they should follow the C++ standard for C++ > > code, since C99 only defines C and had no business trying to specify = how > C++ works. > > > > If you cannot fix the libc headers then you can #define > > __STDC_LIMIT_MACROS in your target's os_defines.h header in = libstdc++ > > (I think that's the right workaround, but I'm not at my desk to = check it ... > > Search for that macro in the libstdc++ source to see how other = targets > > handle non-conforming libc headers. > > > >> This header file is what you need: https://raw.githubusercontent.com/bebbo/amiga-gcc/master/sys-include/stdi= nt.h