public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Bug 54030 - make install does not honor --program-prefix/--program-suffix for 'gcc' (AVR build)
@ 2012-07-19 12:37 Sylvain Leroux
  2012-07-19 17:02 ` Mike Stump
  0 siblings, 1 reply; 2+ messages in thread
From: Sylvain Leroux @ 2012-07-19 12:37 UTC (permalink / raw)
  To: gcc-patches; +Cc: neroden@gcc.gnu.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bug 54030 - make install does not honor --program-prefix/--program-suffix for 'gcc' (AVR build)
  2012-07-19 12:37 [PATCH] Bug 54030 - make install does not honor --program-prefix/--program-suffix for 'gcc' (AVR build) Sylvain Leroux
@ 2012-07-19 17:02 ` Mike Stump
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Stump @ 2012-07-19 17:02 UTC (permalink / raw)
  To: Sylvain Leroux; +Cc: gcc-patches Patches

On Jul 19, 2012, at 5:37 AM, Sylvain Leroux wrote:
> 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).

Looks nice to me...

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-19 17:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-19 12:37 [PATCH] Bug 54030 - make install does not honor --program-prefix/--program-suffix for 'gcc' (AVR build) Sylvain Leroux
2012-07-19 17:02 ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).