Patchwork Fix PR864, apply program_transform_name to ada tools

login
register
mail settings
Submitter Richard Guenther
Date Jan. 7, 2013, 9:47 a.m.
Message ID <alpine.LNX.2.00.1301071045080.6889@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/209886/
State New
Headers show

Comments

Richard Guenther - Jan. 7, 2013, 9:47 a.m.
This makes us unconditionally apply program_transform_name when installing
$(ADA_TOOLS).  It's a patch distros have been applying for ages (now
I've updated it for 4.8 which meant re-writing it completely so I am
eligible to submit it).

Bootstrapped on x86_64-unknown-linux-gnu with --program-suffix=-4.8,
installed (and installation inspected) and tested (which uses the
unsuffixed names - names get changed at install time only).

Ok for trunk?

Thanks,
Richard.

2013-01-04  Richard Biener  <rguenther@suse.de>

	PR ada/864
	* gcc-interface/Make-lang.in (ada.install-common): Always apply
	program_transform_name.
Arnaud Charlet - Jan. 7, 2013, 9:51 a.m.
> This makes us unconditionally apply program_transform_name when
> installing
> $(ADA_TOOLS).  It's a patch distros have been applying for ages (now
> I've updated it for 4.8 which meant re-writing it completely so I am
> eligible to submit it).
> 
> Bootstrapped on x86_64-unknown-linux-gnu with --program-suffix=-4.8,
> installed (and installation inspected) and tested (which uses the
> unsuffixed names - names get changed at install time only).
> 
> Ok for trunk?

OK, thanks.

> 2013-01-04  Richard Biener  <rguenther@suse.de>
> 
> 	PR ada/864
> 	* gcc-interface/Make-lang.in (ada.install-common): Always apply
> 	program_transform_name.

Patch

Index: gcc/ada/gcc-interface/Make-lang.in
===================================================================
--- gcc/ada/gcc-interface/Make-lang.in	(revision 194900)
+++ gcc/ada/gcc-interface/Make-lang.in	(working copy)
@@ -736,14 +736,13 @@  ada.install-common:
 	-if [ -f gnat1$(exeext) ] ; \
 	then \
 	  for tool in $(ADA_TOOLS) ; do \
+	    install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \
+	    $(RM) $(DESTDIR)$(bindir)/$$install_name; \
 	    if [ -f $$tool-cross$(exeext) ] ; \
 	    then \
-	      install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \
-	      $(RM) $(DESTDIR)$(bindir)/$$install_name; \
 	      $(INSTALL_PROGRAM) $$tool-cross$(exeext) $(DESTDIR)$(bindir)/$$install_name; \
 	    else \
-	      $(RM) $(DESTDIR)$(bindir)/$$tool$(exeext); \
-	      $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$tool$(exeext); \
+	      $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$install_name; \
 	    fi ; \
 	  done; \
 	  $(RM) $(DESTDIR)$(bindir)/gnatdll$(exeext); \