Linking with gcc runtime

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Mon May 12 03:31:07 PDT 2008


[cc & reply-to kernel]

Thomas E. Spanjaard wrote:
> Hasso Tepper wrote:
>> There are some software pieces out there which want to link with gcc
>> runtime stuff (emacs and pcc are examples). But we have the
>> interesting files in /usr/lib/gcc<version>/.
>>
>> What I really don't want to do is to maintain patches which will break
>> with every compiler upgrade:
>>
>> #if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 4
>> #define GCC_LIB -L/usr/lib/gcc34
>> ...
>> #elif defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 1
>> #define GCC_LIB -L/usr/lib/gcc41
>> ...
>>
>> Anyone has good ideas how to do it in better way?
> 
> Introduce a varsym which uses CCVER (/usr/lib/gcc/ -> /usr/lib/$(CCVER))?

We don't have varsyms enabled by default.

I think we should investigate whether having crt files for every single compiler is the right thing to do.  maybe not, maybe yes.  I know that I introduced them, but I didn't anticipate that there would be other consumers than the compiler itself.

Anyways, what is emacs doing with these files?  I know that pcc just hijacks these crt files because it doesn't provide its own.

I think it could also be parsed from a cc -v (or so) output.

cheers
  simon

Attachment:
signature.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00004.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20080512/7b2de235/attachment-0021.obj>


More information about the Users mailing list