https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104856
Bug ID: 104856 Summary: Build gcc with a target not containing '-gnu' gets added to gnat target Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: bib_aab at hotmail dot com Target Milestone: --- Building the gcc suite with Ada with a target such as x86_64-suse-linux causes Target_Name to be set to x86_64-suse-linux-gnu in s-oscons.ads. Build gcc with: ../configure --prefix=/opt/gcc-11 --infodir=/opt/gcc-11/share/info --mandir=/opt/gcc-11/share/man --libdir=/opt/gcc-11/usr/lib64 --libexecdir=/opt/gcc-11/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d --enable-offload-targets=nvptx-none, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/opt/gcc-11/include/c++/11 --enable-ssp --disable-libssp --disable-libvtv --enable-cet=auto --disable-libcc1 --disable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/opt/gcc-11/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-libphobos --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-11 --without-system-libunwind --enable-multilib --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux Running 'gcc -dumpmachine' returns x86_64-suse-linux. This is as per the configure switches, so all well and good. However: eth5:~$ grep Target_Name /opt/gcc-11/usr/lib64/gcc/x86_64-suse-linux/11/adainclude/s-oscons.ads Target_Name : constant String := "x86_64-suse-linux-gnu"; For some reason -gnu has been added. This means it is near impossible to build the gprbuild tools since it compares them and barfs because they are not the same. And we cannot just edit that file, since it states 'make changes to s-oscons-tmplt.c and rebuild the GNAT runtime library.' Why on earth is it adding -gnu? If it's a good idea, why doesn't -dumpmachine also return it?