gcc's crt0.o

Michael Brian Bentley bentley at crenelle.com
Thu Apr 5 12:16:20 PDT 2007


I find that I'm using macports more and more as I try to do builds 
using scripts that were developed on GNU/Linux systems with GNU 
versions of tools. I am finding that there's just enough difference 
in the use of some tools like sed and cp (of all utilities, cp?) that 
force me to add the GNU version to /opt/local/bin using mac ports so 
I can move on.

I have a command line tool that I'm trying to build on OS X for OS X, 
using gcc 3. During the link phase, it searches for, but can't find 
crt0.o. When I run this build script on a machine using a SuSE 
distribution of GNU/Linux, no problem.

I'm using the macports installs for gcc41 and gcc42.

According to some recent reading, 
http://www.delorie.com/djgpp/v2faq/faq8_2.html for example, I get the 
impression that crt0.o is something that's provided by the gcc 
compiler for the target platform. I see crt0.o provided with the 
arm-elf xcompiler builds of gcc, but not for the intel / intel 
versions of gcc. The linker is definitely looking for crt0.o, and the 
script that calls gcc does not mention crt0.o anywhere. The crt0.o 
file is mentioned in numerous other places for other builds.

I have found other files that seem related, like crtbegin.o, 
crtbeginS.o, and so on.

Can anyone shed some light on this?

Thanks,

-Mike



More information about the macports-users mailing list