ada/104861 - use target_noncanonial for Target_Name

Message ID 20220310123945.0366513A3D@imap2.suse-dmz.suse.de
State New
Headers
Series ada/104861 - use target_noncanonial for Target_Name |

Commit Message

Richard Biener March 10, 2022, 12:39 p.m. UTC
  The following arranges for s-oscons.ads to record target_noncanonical
for Target_Name, matching the install directory layout and what
gcc -dumpmachine says.  This fixes build issues with gprbuild.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed as
approved in bugzilla.

OK also for branches after a while?

Thanks,
Richard.

2022-03-10  Richard Biener  <rguenther@suse.de>

	PR ada/104861
gcc/ada/
	* gcc-interface/Makefile.in (target_noncanonical): Substitute.
	(OSCONS_CPP): Pass target_noncanonical as TARGET.
---
 gcc/ada/gcc-interface/Makefile.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Arnaud Charlet March 10, 2022, 1:03 p.m. UTC | #1
> The following arranges for s-oscons.ads to record target_noncanonical
> for Target_Name, matching the install directory layout and what
> gcc -dumpmachine says.  This fixes build issues with gprbuild.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed as
> approved in bugzilla.
> 
> OK also for branches after a while?

Yes, thanks.

> 2022-03-10  Richard Biener  <rguenther@suse.de>
> 
> 	PR ada/104861
> gcc/ada/
> 	* gcc-interface/Makefile.in (target_noncanonical): Substitute.
> 	(OSCONS_CPP): Pass target_noncanonical as TARGET.
  

Patch

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