This is the mail archive of the gcc@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: How are the specs generated?


On Thu, Jun 12, 2003 at 03:19:29PM +0200, Ronald Landheer-Cieslak wrote:
> I'm trying to build a cross-compiler for i386-unknown-freebsd4.7 using 
> Newlib as crt, and am trying to figure out how to change the specs used by 
> xgcc to not want a non-existant crt1.o.
> 
> My problem is that when bootstrapping libffi, ld can't find crt1.o (and 
> won't be able to find some other crt?.o files it hasn't complained about 
> yet) because it doesn't exist. AFAIK I won't actually need this file (and 
> probably won't need the others either) because all I need from them is 
> alwready in crt0.o or in libc.a, so I want to remove them from the specs 
> and see how far I get.
> 
> I got as far as finding a gccspec.c file in src/gcc, but I can't quite 
> figure out how this gets to creating the specs file.
> 
> Anybody..?

The specs file is made by the Makefile rule:

	make specs

Which in turn made by calling xgcc (the gcc driver before it is installed) with
the -dumpspecs option.  The specs are made from all of the *_SPEC macros
defined in the various .h files used by the implementation.  You can use the
-specs option to override the specs file used without modifying the base
compiler (note, the formatting uses an explict empty line at the end), .  It
sounds like you picked the wrong target when configuring the compiler, since it
should have the correct object files.

In some systems, there are two separate crt files, one setup by the compiler,
and the other provided with the OS.  Perhaps you need to take the crt1.o (and
corresponding end module) from the BSD release, and either put it in an
appropriate directory or use -L so the compiler can find it.

-- 
Michael Meissner
email: gnu@the-meissners.org
http://www.the-meissners.org


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