From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5010D3858C5F; Thu, 11 May 2023 16:48:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5010D3858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683823716; bh=MMslm1pg9UaUUTGAGxdN+32AZE46Lwh83TRoc61HCxQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ExRJ4MclpYid/6z79GX7dnWcLbLtXnRh62hY2ZGV/hpPqzDKMGJ+sPF3a9hj6ookq GiNnqqUpOqOjld/5LPCnNl5bYAKXi7br74oXR46s06XM4vA8kYqSUSnH1W2zpJ/McS +2st2s/PC7wVFolfPx4ZsTpb0flFrCSWA7mnHYms= From: "lestofante88 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/109814] [13/14 Regression] freestanding using cmath does not compile anymore Date: Thu, 11 May 2023 16:48:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lestofante88 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109814 --- Comment #5 from lesto fante --- > Presumably you're using newlib to provide the libm functions that = declares? newlib-nano, trough the "-specs=3Dnano.specs".=20 Removing -ffreestanding in my project caused a decrease(!) in code size (42= 008 vs 41328), but an increase of max function stack usage (better inlining?) > If people are using more than just with -ffreestanding then thing= s get harder I personally like this breakage, i would have never known this build script= had this error if i would have never used with this compiler version, so big pl= us for me. Maybe a warning instead of an error? I looked a bit online and it seems to be relatively common, considering how hard can be finding stuff about linking in embedded. Even ST's IDE * seems to be doing it, and if this is default, that means a = lot of people like me are just using forbitten lib in freestanding without realizing :( (* https://community.st.com/s/question/0D50X0000AkShGlSQK/cannot-compile-relea= se-configuration-no-rule-to-make-syscallso) ---- arm-none-eabi-gcc -v Using built-in specs. COLLECT_GCC=3Darm-none-eabi-gcc COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/arm-none-eabi/13.1.0/lto-wrapper Target: arm-none-eabi Configured with: /build/arm-none-eabi-gcc/src/gcc-13.1.0/configure --target=3Darm-none-eabi --prefix=3D/usr --with-sysroot=3D/usr/arm-none-eabi --with-native-system-header-dir=3D/include --libexecdir=3D/usr/lib --enable-languages=3Dc,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadma= th --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-system-z= lib --with-newlib --with-headers=3D/usr/arm-none-eabi/include --with-python-dir=3Dshare/gcc-arm-none-eabi --with-gmp --with-mpfr --with-m= pc --with-isl --with-libelf --enable-gnu-indirect-function --with-host-libstdcxx=3D'-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion=3D'Arch Repository' --with-bugurl=3Dhttps://bugs.archlinu= x.org/ --with-multilib-list=3Drmprofile Thread model: single Supported LTO compression algorithms: zlib zstd gcc version 13.1.0 (Arch Repository) ---- arm-none-eabi-gcc -v Using built-in specs. COLLECT_GCC=3Darm-none-eabi-gcc COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/arm-none-eabi/12.2.0/lto-wrapper Target: arm-none-eabi Configured with: /build/arm-none-eabi-gcc/src/gcc-12.2.0/configure --target=3Darm-none-eabi --prefix=3D/usr --with-sysroot=3D/usr/arm-none-eabi --with-native-system-header-dir=3D/include --libexecdir=3D/usr/lib --enable-languages=3Dc,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadma= th --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-system-z= lib --with-newlib --with-headers=3D/usr/arm-none-eabi/include --with-python-dir=3Dshare/gcc-arm-none-eabi --with-gmp --with-mpfr --with-m= pc --with-isl --with-libelf --enable-gnu-indirect-function --with-host-libstdcxx=3D'-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion=3D'Arch Repository' --with-bugurl=3Dhttps://bugs.archlinu= x.org/ --with-multilib-list=3Drmprofile Thread model: single Supported LTO compression algorithms: zlib zstd gcc version 12.2.0 (Arch Repository) ---- arm-none-eabi-g++ -v=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 Using built-in specs. COLLECT_GCC=3D/home/mauro/compilers/gcc-arm-none-eabi-8-2018-q4-major/bin/a= rm-none-eabi-g++ COLLECT_LTO_WRAPPER=3D/home/mauro/compilers/gcc-arm-none-eabi-8-2018-q4-maj= or/bin/../lib/gcc/arm-none-eabi/8.2.1/lto-wrapper Target: arm-none-eabi Configured with: /tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_20181216_1544945247/s= rc/gcc/configure --target=3Darm-none-eabi --prefix=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_20181216_1= 544945247/install-native --libexecdir=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_201812= 16_1544945247/install-native/lib --infodir=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_20181216_= 1544945247/install-native/share/doc/gcc-arm-none-eabi/info --mandir=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_20181216_1= 544945247/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_20181216_= 1544945247/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_20181216_1= 544945247/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=3Dc,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadma= th --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=3Dyes --with-python-dir=3Dshare/gcc-arm-none-eabi --with-sysroot=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_2018= 1216_1544945247/install-native/arm-none-eabi --build=3Dx86_64-linux-gnu --host=3Dx86_64-linux-gnu --with-gmp=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_20181216= _1544945247/build-native/host-libs/usr --with-mpfr=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_2018121= 6_1544945247/build-native/host-libs/usr --with-mpc=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_20181216= _1544945247/build-native/host-libs/usr --with-isl=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_20181216= _1544945247/build-native/host-libs/usr --with-libelf=3D/tmp/jenkins/jenkins-GCC-8-build_toolchain_docker-519_20181= 216_1544945247/build-native/host-libs/usr --with-host-libstdcxx=3D'-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion=3D'GNU Tools for Arm Embedded Processors 8-2018-q4-major' --with-multilib-list=3Drmprofile Thread model: single gcc version 8.2.1 20181213 (release) [gcc-8-branch revision 267074] (GNU To= ols for Arm Embedded Processors 8-2018-q4-major)=