This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, Darwin] update t-* and x-* fragments after switch to auto-deps.
- From: Tom Tromey <tromey at redhat dot com>
- To: Iain Sandoe <iain at codesourcery dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Mike Stump <mikestump at comcast dot net>
- Date: Mon, 30 Sep 2013 08:25:57 -0600
- Subject: Re: [Patch, Darwin] update t-* and x-* fragments after switch to auto-deps.
- Authentication-results: sourceware.org; auth=none
- References: <5A4296A4-10B6-4C9B-AF0A-1955B4DF40F4 at codesourcery dot com> <Pine dot LNX dot 4 dot 64 dot 1309281637290 dot 20127 at digraph dot polyomino dot org dot uk> <9546E761-6417-44AC-84AF-A2C6624F8749 at codesourcery dot com> <A72D2A36-6E37-4977-A501-E88C895AAB58 at codesourcery dot com>
>>>>> "Iain" == Iain Sandoe <firstname.lastname@example.org> writes:
Joseph> Do you need these compilation rules at all? Or could you change
Joseph> config.host to use paths such as config/host-darwin.o rather
Joseph> than just host-darwin.o, and so allow the generic rules to be
Joseph> used (my understanding was that the auto-deps patch series made
Joseph> lots of such changes to the locations of .o files in the build
Joseph> tree to avoid needing special compilation rules for particular
Iain> I had a look at this, and it seems like a useful objective. However,
Iain> unless I'm missing a step, [following the template of
Iain> config.gcc:out_file] it seem to require a fair amount of modification
Iain> (introduction of common-object placeholders etc. in the configury and
Iain> Makefile.in) - plus application and testing of this on multiple
Iain> targets. Not something I can realistically volunteer to do in the
Iain> immediate future.
I think it can be done more simply using vpath. (But I haven't tried
this.) It seems to me though that the out_file stuff is overly manual
and perhaps predates the GNU make requirement.
vpath %.c $(dir $(tmake_file))
vpath %.c $(dir $(xmake_file))
This would let us keep the .o file in ".". Right now, adding a new
directory in which .o files may appear is a bit of a pain, because
configure.ac hard-codes the list of such directories. (This could also
be moved into Makefile, it just seemed more complicated that way...)
Maybe it could also be done by writing a pattern rule that looks in
those directories; though this is more of a pain because tmake_file and
xmake_file can each list multiple files.