public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/104861] New: s-oscons.ads should use target_noncanonical
@ 2022-03-10  7:37 rguenth at gcc dot gnu.org
  2022-03-10  9:20 ` [Bug ada/104861] " ebotcazou at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-10  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104861
           Summary: s-oscons.ads should use target_noncanonical
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

It seems that gprbuild uses Target_Name to construct paths to find files of the
installed gnat but when you configure GCC with a non-canonical target name
like --target=x86_64-suse-linux (omitting -gnu) then make install will use
@target_noncanonical@ for the directory.  That causes the gprbuild tools to
fail to build.

A solution might be to do the following and base Target_Name on
@target_noncanonical@ instead.

diff --git a/gcc/ada/gcc-interface/Makefile.in
b/gcc/ada/gcc-interface/Makefile.in
index b8a24708280..1e9801a8b96 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -138,6 +138,7 @@ objdir = .

 target_alias=@target_alias@
 target=@target@
+target_noncanonical=@target_noncanonical@
 target_cpu=@target_cpu@
 target_vendor=@target_vendor@
 target_os=@target_os@
@@ -598,7 +599,7 @@ OSCONS_CC=$(subst ./xgcc,../../xgcc,$(subst -B./,
-B../../,$(GCC_FOR_TARGET)))
 # has a <types.h> header).

 OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS_FOR_C) -E -C \
-  -DTARGET=\"$(target)\" -iquote $(fsrcpfx)ada $(fsrcpfx)ada/s-oscons-tmplt.c
> s-oscons-tmplt.i
+  -DTARGET=\"$(target_noncanonical)\" -iquote $(fsrcpfx)ada
$(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i
 OSCONS_EXTRACT=$(OSCONS_CC) $(GNATLIBCFLAGS_FOR_C) -S s-oscons-tmplt.i

 # Note: if you need to build with a non-GNU compiler, you could adapt the

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

end of thread, other threads:[~2022-04-21 12:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10  7:37 [Bug ada/104861] New: s-oscons.ads should use target_noncanonical rguenth at gcc dot gnu.org
2022-03-10  9:20 ` [Bug ada/104861] " ebotcazou at gcc dot gnu.org
2022-03-10  9:29 ` ebotcazou at gcc dot gnu.org
2022-03-10 10:36 ` rguenther at suse dot de
2022-03-10 10:39 ` charlet at gcc dot gnu.org
2022-03-10 12:40 ` cvs-commit at gcc dot gnu.org
2022-03-16  7:18 ` rguenth at gcc dot gnu.org
2022-03-16  8:22 ` cvs-commit at gcc dot gnu.org
2022-04-21 12:51 ` cvs-commit at gcc dot gnu.org
2022-04-21 12:58 ` rguenth 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).