public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/104856] New: Build gcc with a target not containing '-gnu' gets added to gnat target
@ 2022-03-09 16:04 bib_aab at hotmail dot com
  2022-03-09 16:43 ` [Bug ada/104856] " ebotcazou at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bib_aab at hotmail dot com @ 2022-03-09 16:04 UTC (permalink / raw)
  To: gcc-bugs

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?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104856] Build gcc with a target not containing '-gnu' gets added to gnat target
  2022-03-09 16:04 [Bug ada/104856] New: Build gcc with a target not containing '-gnu' gets added to gnat target bib_aab at hotmail dot com
@ 2022-03-09 16:43 ` ebotcazou at gcc dot gnu.org
  2022-03-09 17:28 ` schwab@linux-m68k.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2022-03-09 16:43 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
                 CC|                            |ebotcazou at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-03-09

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> 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.

That's not what you're doing though since you do not pass --target, so try
adding --target=x86_64-suse-linux to the configure line.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104856] Build gcc with a target not containing '-gnu' gets added to gnat target
  2022-03-09 16:04 [Bug ada/104856] New: Build gcc with a target not containing '-gnu' gets added to gnat target bib_aab at hotmail dot com
  2022-03-09 16:43 ` [Bug ada/104856] " ebotcazou at gcc dot gnu.org
@ 2022-03-09 17:28 ` schwab@linux-m68k.org
  2022-03-09 18:52 ` bib_aab at hotmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2022-03-09 17:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
--target defaults to --host when not given (and --host defaults to --build when
not given).  Looks like something is using the canonical target name instead of
the target alias.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104856] Build gcc with a target not containing '-gnu' gets added to gnat target
  2022-03-09 16:04 [Bug ada/104856] New: Build gcc with a target not containing '-gnu' gets added to gnat target bib_aab at hotmail dot com
  2022-03-09 16:43 ` [Bug ada/104856] " ebotcazou at gcc dot gnu.org
  2022-03-09 17:28 ` schwab@linux-m68k.org
@ 2022-03-09 18:52 ` bib_aab at hotmail dot com
  2022-03-09 18:54 ` bib_aab at hotmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bib_aab at hotmail dot com @ 2022-03-09 18:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Bib <bib_aab at hotmail dot com> ---
I tried rebuilding with:
../configure --prefix=/opt/gcc11a --enable-languages=c,c++,ada
--enable-offload-targets=nvptx-none, --without-cuda-driver
--enable-checking=release --disable-werror  --enable-ssp --disable-libssp
--disable-libvtv --disable-libcc1 --disable-plugin
--with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--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 --with-tune=generic
--build=x86_64-suse-linux --host=x86_64-suse-linux --target=x86_64-suse-linux
--disable-multilib

And it still happens:
big-iron:/home/src/build/gcc-11.2.0/build$ find /opt/gcc11a/ -name s-oscons.ads
-exec grep -Hi Target_Name {} \;
/opt/gcc11a/lib64/gcc/x86_64-suse-linux/11/adainclude/s-oscons.ads:  
Target_Name                   : constant String  := "x86_64-suse-linux-gnu";

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104856] Build gcc with a target not containing '-gnu' gets added to gnat target
  2022-03-09 16:04 [Bug ada/104856] New: Build gcc with a target not containing '-gnu' gets added to gnat target bib_aab at hotmail dot com
                   ` (2 preceding siblings ...)
  2022-03-09 18:52 ` bib_aab at hotmail dot com
@ 2022-03-09 18:54 ` bib_aab at hotmail dot com
  2022-03-10  8:38 ` rguenth at gcc dot gnu.org
  2022-03-10  9:20 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: bib_aab at hotmail dot com @ 2022-03-09 18:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Bib <bib_aab at hotmail dot com> ---
I have a bug raised with Suse:
https://bugzilla.suse.com/show_bug.cgi?id=1196861

And they are saying:
Hmpf, so the directory name and the -dumpmachine output is using the configured
target, while s-oscons.ads contains the canonicalized variant.  Gah!
Quick grepping on our binary packages indicates that that's the _only_ place
where
the canonical name is used, so maybe the best course of action would be to hack
on it long enough that the generated s-oscons.ads also just contains the
provided
name without canonicalization.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104856] Build gcc with a target not containing '-gnu' gets added to gnat target
  2022-03-09 16:04 [Bug ada/104856] New: Build gcc with a target not containing '-gnu' gets added to gnat target bib_aab at hotmail dot com
                   ` (3 preceding siblings ...)
  2022-03-09 18:54 ` bib_aab at hotmail dot com
@ 2022-03-10  8:38 ` rguenth at gcc dot gnu.org
  2022-03-10  9:20 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-10  8:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I've opened a duplicate with a patch explaining what happens: PR104861

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ada/104856] Build gcc with a target not containing '-gnu' gets added to gnat target
  2022-03-09 16:04 [Bug ada/104856] New: Build gcc with a target not containing '-gnu' gets added to gnat target bib_aab at hotmail dot com
                   ` (4 preceding siblings ...)
  2022-03-10  8:38 ` rguenth at gcc dot gnu.org
@ 2022-03-10  9:20 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2022-03-10  9:20 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---


*** This bug has been marked as a duplicate of bug 104861 ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-10  9:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09 16:04 [Bug ada/104856] New: Build gcc with a target not containing '-gnu' gets added to gnat target bib_aab at hotmail dot com
2022-03-09 16:43 ` [Bug ada/104856] " ebotcazou at gcc dot gnu.org
2022-03-09 17:28 ` schwab@linux-m68k.org
2022-03-09 18:52 ` bib_aab at hotmail dot com
2022-03-09 18:54 ` bib_aab at hotmail dot com
2022-03-10  8:38 ` rguenth at gcc dot gnu.org
2022-03-10  9:20 ` ebotcazou at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).