Using gcc without C librairies
Khem Raj
kraj@mvista.com
Sun Dec 9 20:37:00 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Juju Mimi wrote:
> Hi,
>
> I would like to use gcc to cross-compile C language applications to
> bare metal MIPS, ARM or PPC targets.
you will need separate baremetal toolchain for each architecture. (e.g.
mips-elf arm-elf etc.)
> Those applications does not use any function provided with the usual C
> libraries (no printf, nor memcpy etc...).
> We just wanna use the cross-compiler as a single C syntax interpreter.
> In case the compiler meets a call to an undefined function, we could
> assume it just warns us.
> Usually, we don not eed to link C libraries to our target applications.
>
> Does gcc allow us to use such a configuration?
yes. You will need to stop the startup files and default libraries from
getting linked. -nostartfiles -nodefaultlibs -nostdlib options should
do it for you. Look for details in the gcc man pages.
instead of calling ld from gcc, you can also invoke gnu ld with your own
commandline and linking scripts
> If it does not, do we have to downsize ourself a usual library
> (assuming it is permitted to modify it)?
>
> thk u all,
>
> julian
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
- --
Khem Raj
MontaVista Software Inc.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHWYC6UjbQJxVzeZQRAq/oAJ4sjl82BMpBW0ITbCwYke8O2cLwJgCglBfq
iDCzOEYpzeGn74N+nalUi/c=
=MJtf
-----END PGP SIGNATURE-----
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list