This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding a file while linking


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]