3 msgInline assembly and local variable storage
2 msgHelp with -march and -mcpu issues
3 msgGCC - Preserving statement expression results o...
10 msgSolution sought to GCC 4.1.1 backtrace problem
5 msgCan something similar to &x=&y be accom...
1 msgGNAT/GCC 4.2 build problem on FreeBSD-CURRENT
3 msgLocal disable of specific warnings for a sectio...
3 msgcan gcc compile from memory buffer?

Mac OS X cross compile for i386-elf
\ Ben Abernathy (28 Aug 2007)
. \ Ian Lance Taylor (29 Aug 2007)

2 msgUnsubscription
13 msgSUSv3's 'memory location' and threads
2 msghow to code global indirect branches ?
2 msgHelp about calculation of 'S' notation for a re...
1 msgmovaps missaligment in threads
3 msgcall stack's order of parameters
2 msg-fno-stack-protector not ensuring binary compat...
8 msgGCC asm block optimizations on x86_64
2 msg.p2align
3 msgcompile errors from gcc
5 msgBuilding gmp and mpfr within gcc
Subject:Mac OS X cross compile for i386-elf
Group:Gcc-help
From:Ben Abernathy
Date:28 Aug 2007


Hi,

I am running OS x 10.4 on an Intel processor and am trying to create a
cross compiler that will compile to i386-elf. I started off by
downloading binutils 2.17 and built it targeted to that architecture.
Everything seemed to go fine. Then I downloaded gcc-core-4.2.0 and
configured it with the following parameters:
--prefix=~/tmp/cross-compiler --target=i386-elf --enable-languages=c.
The configure seemed to go fine and I followed it with a make. The
compile seems to fail while building ssp.lo with the following errors
(snipped for sanity):

../../../gcc-4.2.0/libssp/ssp.c: In function '__guard_setup':
../../../gcc-4.2.0/libssp/ssp.c:70: warning: implicit declaration of
function 'open'
../../../gcc-4.2.0/libssp/ssp.c:70: error: 'O_RDONLY' undeclared
(first use in this function)
../../../gcc-4.2.0/libssp/ssp.c:70: error: (Each undeclared identifier
is reported only once
../../../gcc-4.2.0/libssp/ssp.c:70: error: for each function it appears in.)
../../../gcc-4.2.0/libssp/ssp.c:73: error: 'ssize_t' undeclared (first
use in this function)
../../../gcc-4.2.0/libssp/ssp.c:73: error: expected ';' before 'size'
../../../gcc-4.2.0/libssp/ssp.c:75: warning: implicit declaration of
function 'close'
../../../gcc-4.2.0/libssp/ssp.c:76: error: 'size' undeclared (first
use in this function)
../../../gcc-4.2.0/libssp/ssp.c: At top level:
../../../gcc-4.2.0/libssp/ssp.c:89: error: expected declaration
specifiers or '...' before 'size_t'
../../../gcc-4.2.0/libssp/ssp.c: In function 'fail':
../../../gcc-4.2.0/libssp/ssp.c:100: error: 'O_WRONLY' undeclared
(first use in this function)
../../../gcc-4.2.0/libssp/ssp.c:104: error: 'size_t' undeclared (first
use in this function)
../../../gcc- 4.2.0/libssp/ssp.c:104: error: expected ';' before 'progname_len'
../../../gcc-4.2.0/libssp/ssp.c:107: error: 'progname_len' undeclared
(first use in this function)
../../../gcc-4.2.0/libssp/ssp.c:107: warning: implicit declaration of
function 'strlen'
../../../gcc-4.2.0/libssp/ssp.c:107: warning: incompatible implicit
declaration of built-in function 'strlen'
../../../gcc-4.2.0/libssp/ssp.c:108: error: 'len' undeclared (first
use in this function)
../../../gcc-4.2.0/libssp/ssp.c:108: error: 'msg1len' undeclared
(first use in this function)
../../../gcc-4.2.0/libssp/ssp.c:109: warning: implicit declaration of
function 'alloca'
../../../gcc- 4.2.0/libssp/ssp.c:109: warning: incompatible implicit
declaration of built-in function 'alloca'
../../../gcc-4.2.0/libssp/ssp.c:111: warning: implicit declaration of
function 'memcpy'
../../../gcc-4.2.0 /libssp/ssp.c:111: warning: incompatible implicit
declaration of built-in function 'memcpy'
../../../gcc-4.2.0/libssp/ssp.c:119: error: 'ssize_t' undeclared
(first use in this function)
../../../gcc- 4.2.0/libssp/ssp.c:119: error: expected ';' before 'wrote'
../../../gcc-4.2.0/libssp/ssp.c:120: error: 'wrote' undeclared (first
use in this function)
../../../gcc-4.2.0/libssp/ssp.c:151: warning: implicit declaration of
function '_exit'
../../../gcc-4.2.0/libssp/ssp.c:151: warning: incompatible implicit
declaration of built-in function '_exit'

This is my first time building a cross compiler so I don't know if I'm
missing a critical step or something. Does anybody have any ideas?

Thank you,

Ben


© 2004-2008 readlist.com