This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Suggested replacement for specs and switch handling
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: [RFC] Suggested replacement for specs and switch handling
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 26 Jun 2001 21:50:23 -0300
- Cc: gcc at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <20010624141100.A16941@daikokuya.demon.co.uk>
On Jun 24, 2001, Neil Booth <neil@daikokuya.demon.co.uk> wrote:
> The above method does have one disadvantage compared to specs, as
> Michael Meissner pointed out: we don't have run-time configuration any
> more.
I wonder if it would really be too costly to read in (a collection of)
spec files in the format you or Zack propose at run-time, as opposed
to compiler build time. Then, we'd still keep the same run-time
configuration abilities, but we'd have a far more user-friendly specs
interface. We could have pre-compiled specs for speed, if speed is a
concern.
Some other items for the wishlist: in order to properly implement a
portable -rpath/-R-like switch, it would be really nice to have some
means to collect all occurrences of -R/-rpath in the command line and
output a single colon-separated path to the linker, either in a
command-line flag or in an environment variable. It would also be
nice to be able to probe environment variables: for example, in case
we decide to implicitly add the directory containing libstdc++.so to
the search path of an executable being created, we must add it after
any other -R/-rpath options given in the command-line; if none of
these options are present, we should get a list of directories from
LD_RUN_PATH. I really hope this new spec-file format can be made rich
enough to make this possible.
Another issue is that of being able to install front-ends separately,
each one with its own specs. Ideally, the GCC driver would look for
front-end-specific specs in the installation tree and pick them up, so
that it could (i) recognize extensions particular to each front-end,
and decide which programs to start and (ii) recognize object files
produced by certain front ends, and infer which libraries to link in.
This would be a good thing for folks doing development in multiple
languages: ``should I use g77 or g++ to link my application?'' It
would be nice if gcc -fauto-detect could look for annotations in each
object file or library to figure out which other libraries they depend
upon, and have them linked in.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me