This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Guard special installs in install-driver
- From: Richard Biener <rguenther at suse dot de>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: gcc-patches at gcc dot gnu dot org, Paolo Bonzini <bonzini at gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Wed, 2 Apr 2014 09:49:47 +0200 (CEST)
- Subject: Re: [PATCH] Guard special installs in install-driver
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1403311343560 dot 31108 at zhemvz dot fhfr dot qr> <305DBD83-849D-4A93-90DC-EA8426E10B8C at comcast dot net>
On Tue, 1 Apr 2014, Mike Stump wrote:
> On Mar 31, 2014, at 4:50 AM, Richard Biener <rguenther@suse.de> wrote:
> > -$(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 \
> > rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
> > ( cd $(DESTDIR)$(bindir) && \
> > $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \
> > --- 3205,3217 ----
> > install-driver: installdirs xgcc$(exeext)
> > -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
> > -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
> > ! -if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \
> > ! -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext) \
> > ! -( cd $(DESTDIR)$(bindir) && \
> > ! $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ) \
> > ! fi
>
> Certainly safer for release like this, but, gotta wonder if we can avoid
> the ignoring of errors with the added check…
No idea ;) For my case I ended up without an installed driver as
the rm of course succeeded but the rest not ...
> I’d have to work out why
> they did that in the first place and run a build and play a bit to be as
> sure as I’d like to be… but, a cross and a native build I think should
> test it adequately.
Work out why we install _two_ additional variants! (or rather why we
install any additional variants to GCC_INSTALL_NAME at all ...).
Anyway, I now committed the patch. We can always followup with
cleanups to this area later, possibly in stage1.
Richard.