Adding a file while linking
Ramana Radhakrishnan
ramana.radhakrishnan@codito.com
Fri Feb 25 17:08:00 GMT 2005
Hi,
> Ramana
>
> Coul you tell me how is the specs file created during build?
> Thanks for your help
The spec files can be changed by hand after you have built the compiler.
Take a look at the info pages for gcc . Search for Spec files.
Lets say you want to add a startfile depending on a command line option
you would do something like :
%startfile: {option: includeifoptionchosen.o%s} {!option:normal
startfileslist}
or just add this as a condition in your specs.(btw the %s is if you want
the compiler driver to search for the files in the system specs.)
HTH
cheers
Ramana
>
> Khem
>
>
> On Thu, 24 Feb 2005 09:29:00 +0530, Ramana Radhakrishnan
> <ramana.radhakrishnan@codito.com> wrote:
>
>>Khem Raj wrote:
>>
>>>Hi
>>>
>>>I want to add a file when linking is performed using gcc. Like crt*
>>>files. I also want to control the inclusion of this file with a
>>>commandline option in gcc.
>>>
>>>What would be the best way to do it.?
>>
>>Look at the spec files. That would be the way to go ahead and do it
>>easiest .
>>
>>cheers
>>Ramana
>>
>>--
>>Ramana Radhakrishnan
>>GNU Tools
>>codito ergo sum (www.codito.com)
>>
>>
--
Ramana Radhakrishnan
GNU Tools
codito ergo sum (www.codito.com)
More information about the Gcc-help
mailing list