GCC Cross-Compiler issues

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Solar
Member
Member
Posts: 7635
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:GCC Cross-Compiler issues

Post by Solar »

I haven't delved into GCC builtins yet (as I've still quite some stuff to do with the compiler-independent parts of PDCLib before I get to the compiler-specific overlays), but I'm always interested in such information, too...
Every good solution is obvious once you've found it.
AR

Re:GCC Cross-Compiler issues

Post by AR »

In my cross compiler, I can open /cross/lib/gcc/i686-elf/3.4.3/include to find all the "free-standing" headers (stdarg.h, stdint.h, stddef.h, syslimits.h, etc). If you remove -nostdinc from the command line then you can access these during the build (#include <stdarg.h>) without a problem.

Using the builtins doesn't require GPL-ing as far as I can see because stdarg.h includes the following:
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
The builtins appear to be more or less placeholders that GCC recognises and knows what to do with during the build, you can find a list of them in your GCC source directory at ./gcc-3.4.3/gcc/builtins.def
Chris Giese

Re:GCC Cross-Compiler issues

Post by Chris Giese »

Just two more notes:

Though I've never bought anything from them, Cheapbytes appears to be selling four CygWin CDs for $16:
http://cart.cheapbytes.com/cgi-bin/cart/0070011091.html

And pre-built GCC cross-compilers for both Linux and CygWin can be had from eCos mirror sites:

1. Visit http://sources.redhat.com/ecos/mirror.html
2. Chose a mirror site near you
3. At the mirror site, click on 'gnutools'
4. Select 'cygwin' (Windows) host or 'i386linux' host
5. Download cross-compiler

Looks like all these tools use ELF.
Post Reply