Message ID | yddh9egvdde.fsf@lokon.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
> Installing gcc 6.1.0 on Solaris 10 with /bin/ksh failed for > install-gcc-specs (I'd already seen that for 5.1.0, but forgotten about > it): > > make[3]: Entering directory `/var/gcc/gcc-6.1.0/10-gcc-gas/gcc/ada' > for f in ; do \ > cp -p /vol/src/gnu/gcc/gcc-6.1.0/gcc/ada/$f \ > /vol/gcc-5/lib/gcc/i386-pc-solaris2.10/6.1.0/$(echo > $f|sed -e 's#_[a-zA-Z0-9]*##g'); \ > done > /bin/ksh: syntax error at line 1 : `;' unexpected > make[3]: *** [install-gcc-specs] Error 2 > > For most targets, GCC_SPEC_FILES is empty, and for f in ; do makes the > ancient Solaris 10 ksh88 choke. The problem can be avoided by using > $(foreach instead. During testing, I noticed that the target also > doesn't honor DESTDIR. > > The following patch fixes both. Tested by running make > install-gcc-specs on i386-pc-solaris2.10 and additionally with > GCC_SPEC_FILES=vxworks-x86-link.spec. > > Ok for mainline and the gcc-6 and gcc-5 branches? OK, thanks.
# HG changeset patch # Parent 6a07b8a8ce8b870d4cf37ebbcac7d7965340d4d6 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 @@ -2670,10 +2670,9 @@ 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)/$$(echo $$f|sed -e 's#_[a-zA-Z0-9]*##g'); \ - done + $(foreach f,$(GCC_SPEC_FILES), \ + $(INSTALL_DATA_DATE) $(srcdir)/ada/$(f) \ + $(DESTDIR)$(libsubdir)/$$(echo $(f)|sed -e 's#_[a-zA-Z0-9]*##g');) install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)