[ada,build] Fix make install-gcc-specs with empty GCC_SPEC_FILES

Message ID ydd1s1av3kw.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show
Series
  • [ada,build] Fix make install-gcc-specs with empty GCC_SPEC_FILES
Related show

Commit Message

Rainer Orth May 7, 2019, 12:42 p.m.
When installing gcc 9.1.0 on Solaris 10 with CONFIG_SHELL=/bin/ksh, it
failed in the same way as originally fixed by

	https://gcc.gnu.org/ml/gcc-patches/2016-05/msg00087.html

While the patch still is on the gcc-5 and gcc-6 branches, it has been
lost (inadvertently, I assume) on trunk before gcc-7 branched by r244367.

I'd like to restore the fix, preferably on all of mainline and the
gcc-9, gcc-8, and gcc-7 branches.

Tested with the gcc 9.1.0 release on i386-pc-solaris2.10 and
sparc-sun-solaris2.10.  Ok?

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2019-05-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
	Honor DESTDIR.

Comments

Arnaud Charlet May 7, 2019, 12:47 p.m. | #1
> When installing gcc 9.1.0 on Solaris 10 with CONFIG_SHELL=/bin/ksh, it

> failed in the same way as originally fixed by

> 

> 	https://gcc.gnu.org/ml/gcc-patches/2016-05/msg00087.html

> 

> While the patch still is on the gcc-5 and gcc-6 branches, it has been

> lost (inadvertently, I assume) on trunk before gcc-7 branched by r244367.

> 

> I'd like to restore the fix, preferably on all of mainline and the

> gcc-9, gcc-8, and gcc-7 branches.

> 

> Tested with the gcc 9.1.0 release on i386-pc-solaris2.10 and

> sparc-sun-solaris2.10.  Ok?


OK

Patch

# HG changeset patch
# Parent  cbbedd772b72266ea85b3f1548ddefe1f6248836
Fix make install-gcc-specs with empty GCC_SPECS_FILES

diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -505,9 +505,8 @@  gnatlink-re: ../stamp-tools gnatmake-re
 install-gcc-specs:
 #	Install all the requested GCC spec files.
 
-	for f in $(GCC_SPEC_FILES); do \
-	    $(INSTALL_DATA_DATE) $(srcdir)/ada/$$f $(libsubdir)/; \
-	done
+	$(foreach f,$(GCC_SPEC_FILES), \
+	    $(INSTALL_DATA_DATE) $(srcdir)/ada/$(f) $(DESTDIR)$(libsubdir)/;)
 
 install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs
 	$(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)