This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: xgcc: installation problem, cannot exec `../stage1/collect2': Arg list too long
- To: Zack Weinberg <zack at wolery dot cumb dot org>
- Subject: Re: xgcc: installation problem, cannot exec `../stage1/collect2': Arg list too long
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 04 Aug 2000 13:23:12 -0600
- cc: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>, gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <20000618150214.A21136@wolery.cumb.org>you write:
> On Sat, Jun 17, 2000 at 02:03:55PM -0400, John David Anglin wrote:
> > xgcc: installation problem, cannot exec `../stage1/collect2':
> > Arg list too long
> >
> > Any thoughts in getting around this one? This looks like a system limit.
> > Maybe we need a library of gcc objects?
>
> Putting the back end in a library seems like a good idea to me,
> never mind whether or not we're really hitting command line length limits.
> Here's a patch - has been bootstrapped on i386-linux, testsuite is running
> now. Please let us know if it solves your problem.
>
> Note this inflicts ordering constraints on cc1* link lines; $(BACKEND)
> has to come after the front end objects. Also, toplev.o has to be
> left out of the library since it contains main.
>
> It occurred to me, while generating this patch, that we could easily
> have nonrecursive builds within the gcc directory by moving all the logic
> from subdirs' Makefile.in to their Make-lang.in. The objc directory is
> already like that. I bet the build system would get significantly simpler.
> I may try to do this in a successor patch.
>
> zw
>
>
> * Makefile.in: Remove toplev.o from OBJS. Add rule to make
> libbackend.a; add libbackend.a to STAGESTUFF. Add BACKEND
> variable. Use BACKEND when linking cc1, not OBJS. Add BACKEND
> to VOL_FILES.
> ch:
> * Make-lang.in (cc1chill): Depend on $(BACKEND), not stamp-objlist.
> * Makefile.in (cc1chill): Link with $(BACKEND). Define BACKEND,
> eliminate C_OBJS (was commented out), OBJS, OBJDEPS.
> cp:
> * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
> * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
> (cc1plus): Link with $(BACKEND) and $(C_OBJS).
> f:
> * Make-lang.in (f771): Depend on $(BACKEND), not stamp-objlist.
> * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
> (f771): Link with $(BACKEND).
> java:
> * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
> * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
> (jc1): Link with $(BACKEND).
> (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
> objc:
> * Make-lang.in (cc1obj): Link with $(BACKEND).
It looks good to me.
Please install this patch.
Thanks,
jeff