Language-specific libraries and `gcc' driver
Theodore Papadopoulo
Theodore.Papadopoulo@sophia.inria.fr
Fri Apr 21 07:15:00 GMT 2000
peter@gerwinski.de said:
> Or, one can use the more elaborate automatism by Theodore Papadopoulo.
> (But wouldn't that approach require `collect2' being run on all
> systems?)
Well proposed... and had very few reactions (but positive) from Mumit
Khan and Richard Kenner.
Two remarks were done:
- In some cases, gcc can already put a language identifier to help
gdb. But very few ports use that.... So one track is to generalize
this (which is slightly redundant with the symbol gcc_compiled (see
ASM_IDENTIFY_LANGUAGE).
Mumit also suggested directly emitting the libraries names in the
object file instead of identifying the compiler. I must admit that I
have trouble estimating the advantages and drawbacks of such a choice.
My preference would go towards marking the language but then collect2
has to be aware of all languages. In the other case, each frontend is
responsible for naming the libraries it uses and collect2 just adds
these lines to the linker parameters but there will remain problems
of compiler versions, library versions and orders ...
Yes that would mandate that collect2 is used for all ports (but I
also thought that collect2 was not used with i686-pc-linux-gnu and it
seems to be (well it is compiled (and I think called) at least)).
> Anyone working towards this?
Well, I tried a little experimentation but have not gone very far because I
did not had much free time recently and because I felt that this was
not a priority.
If there is more interest, I can go further but definitely need some
advice from more knoledgeable people than me (I know too little about
binary file formats and their compatibility): what to put in the object
(language def or library list or ...), in what form (ident string seems
to be the simplest way but then a whole scanning pass has to be done in
collect2 as far as I can tell, symbol seems to be too restrictive in terms
of allowed character set).
Theo.
--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------
More information about the Gcc
mailing list