Hi,

I cc Nathanael Nerode since according to MAINTENERS he one of the people in charge of Makefile.in.


I filed a bug against make install which does not honor --program-prefix/--program-suffix for the driver 'gcc' while building for target AVR (maybe others too). In a particular case (--program-prefix='avr-' --program-suffix='-4.7.1'), gcc is not installed at all in $(DESTDIR)$(bindir).

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54030


By taking a closer look at the output of 'make install' it appears that gcc is in fact installed with the requested name, but removed just afterward:
-------8<----------
rm -f /tmp/gcc-4.7.1/bin/avr-gcc-4.7.1
/usr/bin/install -c xgcc /tmp/gcc-4.7.1/bin/avr-gcc-4.7.1  (install)
rm -f /tmp/gcc-4.7.1/bin/avr-gcc-4.7.1                     (delete )
-------8<----------

I fixed the problem by swapping the two corresponding lines in the target 'install-driver' of the file ${GCCSRC}gcc/Makefile.in:

Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in     (revision 189649)
+++ gcc/Makefile.in     (working copy)
@@ -4651,8 +4651,8 @@
 # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
 install-driver: installdirs xgcc$(exeext)
        -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
+       -rm -f 
$(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext)
-$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
-       -rm -f 
$(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext)
        -( cd $(DESTDIR)$(bindir) && \
$(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) )
        -if [ -f gcc-cross$(exeext) ] ; then \


With that patch, gcc is installed both with its canonical name (avr-gcc-4.7.1) and with the requested program -prefix/-suffix like all other binaries.

- Sylvain

Reply via email to