Linux MIPS Architecture development
 help / color / mirror / Atom feed
* cross compiling gcc for mips
@ 2004-12-31 11:32 Mudeem Iqbal
  2005-01-02 16:54 ` Scott Parker
  0 siblings, 1 reply; 9+ messages in thread
From: Mudeem Iqbal @ 2004-12-31 11:32 UTC (permalink / raw)
  To: 'linux-mips@linux-mips.org'

Hi,

I am building a toolchain for mips platform. I am using

binutils-2.15
gcc-3.4.3
glibc-2.3.3
linux-2.6.9	(from linux-mips.org)

First I built binutils and now I was setting up the bootstrap compiler.
However when I do "make all-gcc" I get the following errors.


In file included from ./gthr-default.h:1,
                 from ../../gcc-3.4.3/gcc/gthr.h:96,
                 from ../../gcc-3.4.3/gcc/unwind-dw2.c:42:
../../gcc-3.4.3/gcc/gthr-posix.h:43:21: pthread.h: No such file or directory
../../gcc-3.4.3/gcc/gthr-posix.h:44:20: unistd.h: No such file or directory
In file included from ./gthr-default.h:1,
                 from ../../gcc-3.4.3/gcc/gthr.h:96,
                 from ../../gcc-3.4.3/gcc/unwind-dw2.c:42:
../../gcc-3.4.3/gcc/gthr-posix.h:46: error: parse error before
"__gthread_key_t"
../../gcc-3.4.3/gcc/gthr-posix.h:46: warning: type defaults to `int' in
declaration of `__gthread_key_t'
../../gcc-3.4.3/gcc/gthr-posix.h:46: warning: data definition has no type or
storage class
../../gcc-3.4.3/gcc/gthr-posix.h:47: error: parse error before
"__gthread_once_t"
../../gcc-3.4.3/gcc/gthr-posix.h:47: warning: type defaults to `int' in
declaration of `__gthread_once_t'
../../gcc-3.4.3/gcc/gthr-posix.h:47: warning: data definition has no type or
storage class
../../gcc-3.4.3/gcc/gthr-posix.h:48: error: parse error before
"__gthread_mutex_t"
../../gcc-3.4.3/gcc/gthr-posix.h:48: warning: type defaults to `int' in
declaration of `__gthread_mutex_t'
../../gcc-3.4.3/gcc/gthr-posix.h:48: warning: data definition has no type or
storage class
../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_active_p':
../../gcc-3.4.3/gcc/gthr-posix.h:96: error: `pthread_create' undeclared
(first use in this function)
../../gcc-3.4.3/gcc/gthr-posix.h:96: error: (Each undeclared identifier is
reported only once
../../gcc-3.4.3/gcc/gthr-posix.h:96: error: for each function it appears
in.)
../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
../../gcc-3.4.3/gcc/gthr-posix.h:456: error: parse error before '*' token
../../gcc-3.4.3/gcc/gthr-posix.h:456: error: parse error before ')' token
../../gcc-3.4.3/gcc/gthr-posix.h:465: error: parse error before '*' token
../../gcc-3.4.3/gcc/gthr-posix.h:465: error: parse error before ')' token
../../gcc-3.4.3/gcc/gthr-posix.h:471: error: parse error before "key"
../../gcc-3.4.3/gcc/gthr-posix.h:472: warning: function declaration isn't a
prototype
../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_key_delete':
../../gcc-3.4.3/gcc/gthr-posix.h:472: warning: old-style parameter
declaration
../../gcc-3.4.3/gcc/gthr-posix.h:473: warning: implicit declaration of
function `pthread_key_delete'
../../gcc-3.4.3/gcc/gthr-posix.h:473: error: `key' undeclared (first use in
this function)
../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
../../gcc-3.4.3/gcc/gthr-posix.h:477: error: parse error before "key"
../../gcc-3.4.3/gcc/gthr-posix.h:478: warning: function declaration isn't a
prototype
../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_getspecific':
../../gcc-3.4.3/gcc/gthr-posix.h:478: warning: old-style parameter
declaration
../../gcc-3.4.3/gcc/gthr-posix.h:479: warning: implicit declaration of
function `pthread_getspecific'
../../gcc-3.4.3/gcc/gthr-posix.h:479: error: `key' undeclared (first use in
this function)
../../gcc-3.4.3/gcc/gthr-posix.h:479: warning: return makes pointer from
integer without a cast
../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
../../gcc-3.4.3/gcc/gthr-posix.h:483: error: parse error before "key"
../../gcc-3.4.3/gcc/gthr-posix.h:484: warning: function declaration isn't a
prototype
../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_setspecific':
../../gcc-3.4.3/gcc/gthr-posix.h:484: warning: old-style parameter
declaration
../../gcc-3.4.3/gcc/gthr-posix.h:485: warning: implicit declaration of
function `pthread_setspecific'
../../gcc-3.4.3/gcc/gthr-posix.h:485: error: `key' undeclared (first use in
this function)
../../gcc-3.4.3/gcc/gthr-posix.h:485: error: `ptr' undeclared (first use in
this function)
../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
../../gcc-3.4.3/gcc/gthr-posix.h:489: error: parse error before '*' token
../../gcc-3.4.3/gcc/gthr-posix.h:490: warning: function declaration isn't a
prototype
../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_mutex_lock':
../../gcc-3.4.3/gcc/gthr-posix.h:490: warning: old-style parameter
declaration
../../gcc-3.4.3/gcc/gthr-posix.h:492: warning: implicit declaration of
function `pthread_mutex_lock'
../../gcc-3.4.3/gcc/gthr-posix.h:492: error: `mutex' undeclared (first use
in this function)
../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
../../gcc-3.4.3/gcc/gthr-posix.h:498: error: parse error before '*' token
../../gcc-3.4.3/gcc/gthr-posix.h:499: warning: function declaration isn't a
prototype
../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_mutex_trylock':
../../gcc-3.4.3/gcc/gthr-posix.h:499: warning: old-style parameter
declaration
../../gcc-3.4.3/gcc/gthr-posix.h:501: warning: implicit declaration of
function `pthread_mutex_trylock'
../../gcc-3.4.3/gcc/gthr-posix.h:501: error: `mutex' undeclared (first use
in this function)
../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
../../gcc-3.4.3/gcc/gthr-posix.h:507: error: parse error before '*' token
../../gcc-3.4.3/gcc/gthr-posix.h:508: warning: function declaration isn't a
prototype
../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_mutex_unlock':
../../gcc-3.4.3/gcc/gthr-posix.h:508: warning: old-style parameter
declaration
../../gcc-3.4.3/gcc/gthr-posix.h:510: warning: implicit declaration of
function `pthread_mutex_unlock'
../../gcc-3.4.3/gcc/gthr-posix.h:510: error: `mutex' undeclared (first use
in this function)
../../gcc-3.4.3/gcc/unwind-dw2.c: In function `uw_frame_state_for':
../../gcc-3.4.3/gcc/unwind-dw2.c:1013: warning: implicit declaration of
function `memset'
../../gcc-3.4.3/gcc/unwind-dw2.c: In function `uw_init_context_1':
../../gcc-3.4.3/gcc/unwind-dw2.c:1291: error: syntax error before
"once_regsizes"
../../gcc-3.4.3/gcc/unwind-dw2.c:1292: warning: implicit declaration of
function `__gthread_once'
../../gcc-3.4.3/gcc/unwind-dw2.c:1292: error: `once_regsizes' undeclared
(first use in this function)
../../gcc-3.4.3/gcc/unwind-dw2.c: In function `uw_install_context_1':
../../gcc-3.4.3/gcc/unwind-dw2.c:1341: warning: implicit declaration of
function `memcpy'
make[2]: *** [libgcc/./unwind-dw2.o] Error 1
make[2]: Leaving directory
`/home/mudeem/ashwaria_rai/build-tools/build-boot-gcc/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory
`/home/mudeem/ashwaria_rai/build-tools/build-boot-gcc/gcc'
make: *** [all-gcc] Error 2


Thanx in advance.

Regards

Mudeem

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cross compiling gcc for mips
  2004-12-31 11:32 cross compiling gcc for mips Mudeem Iqbal
@ 2005-01-02 16:54 ` Scott Parker
  2005-01-02 17:01   ` Stephen P. Becker
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Parker @ 2005-01-02 16:54 UTC (permalink / raw)
  To: Mudeem Iqbal; +Cc: 'linux-mips@linux-mips.org'

How did you configure GCC?

Mudeem Iqbal wrote:
> Hi,
> 
> I am building a toolchain for mips platform. I am using
> 
> binutils-2.15
> gcc-3.4.3
> glibc-2.3.3
> linux-2.6.9	(from linux-mips.org)
> 
> First I built binutils and now I was setting up the bootstrap compiler.
> However when I do "make all-gcc" I get the following errors.
> 
> 
> In file included from ./gthr-default.h:1,
>                  from ../../gcc-3.4.3/gcc/gthr.h:96,
>                  from ../../gcc-3.4.3/gcc/unwind-dw2.c:42:
> ../../gcc-3.4.3/gcc/gthr-posix.h:43:21: pthread.h: No such file or directory
> ../../gcc-3.4.3/gcc/gthr-posix.h:44:20: unistd.h: No such file or directory
> In file included from ./gthr-default.h:1,
>                  from ../../gcc-3.4.3/gcc/gthr.h:96,
>                  from ../../gcc-3.4.3/gcc/unwind-dw2.c:42:
> ../../gcc-3.4.3/gcc/gthr-posix.h:46: error: parse error before
> "__gthread_key_t"
> ../../gcc-3.4.3/gcc/gthr-posix.h:46: warning: type defaults to `int' in
> declaration of `__gthread_key_t'
> ../../gcc-3.4.3/gcc/gthr-posix.h:46: warning: data definition has no type or
> storage class
> ../../gcc-3.4.3/gcc/gthr-posix.h:47: error: parse error before
> "__gthread_once_t"
> ../../gcc-3.4.3/gcc/gthr-posix.h:47: warning: type defaults to `int' in
> declaration of `__gthread_once_t'
> ../../gcc-3.4.3/gcc/gthr-posix.h:47: warning: data definition has no type or
> storage class
> ../../gcc-3.4.3/gcc/gthr-posix.h:48: error: parse error before
> "__gthread_mutex_t"
> ../../gcc-3.4.3/gcc/gthr-posix.h:48: warning: type defaults to `int' in
> declaration of `__gthread_mutex_t'
> ../../gcc-3.4.3/gcc/gthr-posix.h:48: warning: data definition has no type or
> storage class
> ../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_active_p':
> ../../gcc-3.4.3/gcc/gthr-posix.h:96: error: `pthread_create' undeclared
> (first use in this function)
> ../../gcc-3.4.3/gcc/gthr-posix.h:96: error: (Each undeclared identifier is
> reported only once
> ../../gcc-3.4.3/gcc/gthr-posix.h:96: error: for each function it appears
> in.)
> ../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
> ../../gcc-3.4.3/gcc/gthr-posix.h:456: error: parse error before '*' token
> ../../gcc-3.4.3/gcc/gthr-posix.h:456: error: parse error before ')' token
> ../../gcc-3.4.3/gcc/gthr-posix.h:465: error: parse error before '*' token
> ../../gcc-3.4.3/gcc/gthr-posix.h:465: error: parse error before ')' token
> ../../gcc-3.4.3/gcc/gthr-posix.h:471: error: parse error before "key"
> ../../gcc-3.4.3/gcc/gthr-posix.h:472: warning: function declaration isn't a
> prototype
> ../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_key_delete':
> ../../gcc-3.4.3/gcc/gthr-posix.h:472: warning: old-style parameter
> declaration
> ../../gcc-3.4.3/gcc/gthr-posix.h:473: warning: implicit declaration of
> function `pthread_key_delete'
> ../../gcc-3.4.3/gcc/gthr-posix.h:473: error: `key' undeclared (first use in
> this function)
> ../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
> ../../gcc-3.4.3/gcc/gthr-posix.h:477: error: parse error before "key"
> ../../gcc-3.4.3/gcc/gthr-posix.h:478: warning: function declaration isn't a
> prototype
> ../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_getspecific':
> ../../gcc-3.4.3/gcc/gthr-posix.h:478: warning: old-style parameter
> declaration
> ../../gcc-3.4.3/gcc/gthr-posix.h:479: warning: implicit declaration of
> function `pthread_getspecific'
> ../../gcc-3.4.3/gcc/gthr-posix.h:479: error: `key' undeclared (first use in
> this function)
> ../../gcc-3.4.3/gcc/gthr-posix.h:479: warning: return makes pointer from
> integer without a cast
> ../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
> ../../gcc-3.4.3/gcc/gthr-posix.h:483: error: parse error before "key"
> ../../gcc-3.4.3/gcc/gthr-posix.h:484: warning: function declaration isn't a
> prototype
> ../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_setspecific':
> ../../gcc-3.4.3/gcc/gthr-posix.h:484: warning: old-style parameter
> declaration
> ../../gcc-3.4.3/gcc/gthr-posix.h:485: warning: implicit declaration of
> function `pthread_setspecific'
> ../../gcc-3.4.3/gcc/gthr-posix.h:485: error: `key' undeclared (first use in
> this function)
> ../../gcc-3.4.3/gcc/gthr-posix.h:485: error: `ptr' undeclared (first use in
> this function)
> ../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
> ../../gcc-3.4.3/gcc/gthr-posix.h:489: error: parse error before '*' token
> ../../gcc-3.4.3/gcc/gthr-posix.h:490: warning: function declaration isn't a
> prototype
> ../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_mutex_lock':
> ../../gcc-3.4.3/gcc/gthr-posix.h:490: warning: old-style parameter
> declaration
> ../../gcc-3.4.3/gcc/gthr-posix.h:492: warning: implicit declaration of
> function `pthread_mutex_lock'
> ../../gcc-3.4.3/gcc/gthr-posix.h:492: error: `mutex' undeclared (first use
> in this function)
> ../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
> ../../gcc-3.4.3/gcc/gthr-posix.h:498: error: parse error before '*' token
> ../../gcc-3.4.3/gcc/gthr-posix.h:499: warning: function declaration isn't a
> prototype
> ../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_mutex_trylock':
> ../../gcc-3.4.3/gcc/gthr-posix.h:499: warning: old-style parameter
> declaration
> ../../gcc-3.4.3/gcc/gthr-posix.h:501: warning: implicit declaration of
> function `pthread_mutex_trylock'
> ../../gcc-3.4.3/gcc/gthr-posix.h:501: error: `mutex' undeclared (first use
> in this function)
> ../../gcc-3.4.3/gcc/gthr-posix.h: At top level:
> ../../gcc-3.4.3/gcc/gthr-posix.h:507: error: parse error before '*' token
> ../../gcc-3.4.3/gcc/gthr-posix.h:508: warning: function declaration isn't a
> prototype
> ../../gcc-3.4.3/gcc/gthr-posix.h: In function `__gthread_mutex_unlock':
> ../../gcc-3.4.3/gcc/gthr-posix.h:508: warning: old-style parameter
> declaration
> ../../gcc-3.4.3/gcc/gthr-posix.h:510: warning: implicit declaration of
> function `pthread_mutex_unlock'
> ../../gcc-3.4.3/gcc/gthr-posix.h:510: error: `mutex' undeclared (first use
> in this function)
> ../../gcc-3.4.3/gcc/unwind-dw2.c: In function `uw_frame_state_for':
> ../../gcc-3.4.3/gcc/unwind-dw2.c:1013: warning: implicit declaration of
> function `memset'
> ../../gcc-3.4.3/gcc/unwind-dw2.c: In function `uw_init_context_1':
> ../../gcc-3.4.3/gcc/unwind-dw2.c:1291: error: syntax error before
> "once_regsizes"
> ../../gcc-3.4.3/gcc/unwind-dw2.c:1292: warning: implicit declaration of
> function `__gthread_once'
> ../../gcc-3.4.3/gcc/unwind-dw2.c:1292: error: `once_regsizes' undeclared
> (first use in this function)
> ../../gcc-3.4.3/gcc/unwind-dw2.c: In function `uw_install_context_1':
> ../../gcc-3.4.3/gcc/unwind-dw2.c:1341: warning: implicit declaration of
> function `memcpy'
> make[2]: *** [libgcc/./unwind-dw2.o] Error 1
> make[2]: Leaving directory
> `/home/mudeem/ashwaria_rai/build-tools/build-boot-gcc/gcc'
> make[1]: *** [libgcc.a] Error 2
> make[1]: Leaving directory
> `/home/mudeem/ashwaria_rai/build-tools/build-boot-gcc/gcc'
> make: *** [all-gcc] Error 2
> 
> 
> Thanx in advance.
> 
> Regards
> 
> Mudeem
> 
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cross compiling gcc for mips
  2005-01-02 16:54 ` Scott Parker
@ 2005-01-02 17:01   ` Stephen P. Becker
  2005-01-02 17:46     ` Gilad Rom
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen P. Becker @ 2005-01-02 17:01 UTC (permalink / raw)
  To: Scott Parker; +Cc: Mudeem Iqbal, 'linux-mips@linux-mips.org'

Scott Parker wrote:
> How did you configure GCC?
> 
> Mudeem Iqbal wrote:
> 
>> Hi,
>>
>> I am building a toolchain for mips platform. I am using
>>
>> binutils-2.15
>> gcc-3.4.3
>> glibc-2.3.3
>> linux-2.6.9    (from linux-mips.org)
>>

Try using 2.4 headers instead.  I haven't had much success using 2.6 
headers to build a mips (cross)toolchain.

Steve

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cross compiling gcc for mips
  2005-01-02 17:01   ` Stephen P. Becker
@ 2005-01-02 17:46     ` Gilad Rom
  0 siblings, 0 replies; 9+ messages in thread
From: Gilad Rom @ 2005-01-02 17:46 UTC (permalink / raw)
  To: Stephen P. Becker
  Cc: Scott Parker, Mudeem Iqbal, 'linux-mips@linux-mips.org'

Just incase you haven't tried it yet, I'd recommend
crosstool (http://kegel.com/crosstool/) a very nice
set of scripts to automate the toolchain building
process. Also, uClibc has a very nice toolchain
build script at http://www.uclibc.org/toolchains.html
(if you are aiming for an embedded target).

Gilad.

Stephen P. Becker wrote:
> Scott Parker wrote:
> 
>> How did you configure GCC?
>>
>> Mudeem Iqbal wrote:
>>
>>> Hi,
>>>
>>> I am building a toolchain for mips platform. I am using
>>>
>>> binutils-2.15
>>> gcc-3.4.3
>>> glibc-2.3.3
>>> linux-2.6.9    (from linux-mips.org)
>>>
> 
> Try using 2.4 headers instead.  I haven't had much success using 2.6 
> headers to build a mips (cross)toolchain.
> 
> Steve
> 
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: cross compiling gcc for mips
@ 2005-01-03  4:40 Mudeem Iqbal
  0 siblings, 0 replies; 9+ messages in thread
From: Mudeem Iqbal @ 2005-01-03  4:40 UTC (permalink / raw)
  To: 'Stephen P. Becker', 'Scott Parker'
  Cc: 'linux-mips@linux-mips.org'

Hi,

Initially I was configuring gcc by

../gcc-3.4.3/configure --target=mipsel-linux --prefix=${PREFIX}
--without-headers --with-newlib --enable-languages=c

I looked up a bit and found --disable-threads option, so when I configure
gcc using --disbale-threads option I don't get the the initial threads
related errors but i just get

/home/mudeem/ashwaria_rai/tools/mipsel-linux/bin/ld: crti.o: No such file:
No such file or directory
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: Leaving directory
`/home/mudeem/ashwaria_rai/build-tools/build-boot-gcc/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory
`/home/mudeem/ashwaria_rai/build-tools/build-boot-gcc/gcc'
make: *** [all-gcc] Error 2

Steve, if I am specifying --without-headers flag, that means not using
headers at all right??? Actaully I am following the instructions from the
O'Reilly's book "building Embedded Linux Systems" It is written that
--without-headers option is broken in gcc 3.2 and subsequent 3.2.1 releases.
Has it been fixed in gcc 3.4.3 ???

Mudeem


-----Original Message-----
From: Stephen P. Becker [mailto:geoman@gentoo.org]
Sent: Sunday, January 02, 2005 10:01 PM
To: Scott Parker
Cc: Mudeem Iqbal; 'linux-mips@linux-mips.org'
Subject: Re: cross compiling gcc for mips


Scott Parker wrote:
> How did you configure GCC?
> 
> Mudeem Iqbal wrote:
> 
>> Hi,
>>
>> I am building a toolchain for mips platform. I am using
>>
>> binutils-2.15
>> gcc-3.4.3
>> glibc-2.3.3
>> linux-2.6.9    (from linux-mips.org)
>>

Try using 2.4 headers instead.  I haven't had much success using 2.6 
headers to build a mips (cross)toolchain.

Steve

^ permalink raw reply	[flat|nested] 9+ messages in thread

* cross compiling gcc for mips
@ 2006-07-18  7:12 qi tao
  2006-07-18 10:53 ` Maciej W. Rozycki
  2006-07-19 18:35 ` James E Wilson
  0 siblings, 2 replies; 9+ messages in thread
From: qi tao @ 2006-07-18  7:12 UTC (permalink / raw)
  To: linux-mips

hello:
I am building a toolchain for mips platform. I am using

binutils-2.17
gcc-4.1.1
glibc-2.4
linux-2.6.17.4
linux-headers-2.6.17.4

First I built binutils and now I was setting up the bootstrap compiler.
However when I do "make all-gcc" I get the following errors:
  

  -c ../../gcc-4.1.1/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
In file included from ../../gcc-4.1.1/gcc/crtstuff.c:68:
.../../gcc-4.1.1/gcc/tsystem.h:90:19: error: stdio.h: 没有那个文件或目录
.../../gcc-4.1.1/gcc/tsystem.h:93:23: error: sys/types.h: 没有那个文件或目录
.../../gcc-4.1.1/gcc/tsystem.h:96:19: error: errno.h: 没有那个文件或目录
.../../gcc-4.1.1/gcc/tsystem.h:103:20: error: string.h: 没有那个文件或目录
.../../gcc-4.1.1/gcc/tsystem.h:104:20: error: stdlib.h: 没有那个文件或目录
.../../gcc-4.1.1/gcc/tsystem.h:105:20: error: unistd.h: 没有那个文件或目录
In file included from 
/opt/cross_src4.1.1/gcc-build/./gcc/include/syslimits.h:7,
                 from 
/opt/cross_src4.1.1/gcc-build/./gcc/include/limits.h:11,
                 from ../../gcc-4.1.1/gcc/tsystem.h:108,
                 from ../../gcc-4.1.1/gcc/crtstuff.c:68:
/opt/cross_src4.1.1/gcc-build/./gcc/include/limits.h:122:61: error: 
limits.h: 没 有那个文件或目录
In file included from ../../gcc-4.1.1/gcc/crtstuff.c:68:
.../../gcc-4.1.1/gcc/tsystem.h:111:18: error: time.h: 没有那个文件或目录
make[1]: *** [crtbegin.o] 错误 1
make[1]: Leaving directory `/opt/cross_src4.1.1/gcc-build/gcc'
make: *** [all-gcc] 错误 2
 
what should i do??  thanks for your help ! thank you

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cross compiling gcc for mips
  2006-07-18  7:12 qi tao
@ 2006-07-18 10:53 ` Maciej W. Rozycki
  2006-07-18 12:47   ` Fuxin Zhang
  2006-07-19 18:35 ` James E Wilson
  1 sibling, 1 reply; 9+ messages in thread
From: Maciej W. Rozycki @ 2006-07-18 10:53 UTC (permalink / raw)
  To: qi tao; +Cc: linux-mips

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1554 bytes --]

On Tue, 18 Jul 2006, qi tao wrote:

> However when I do "make all-gcc" I get the following errors:
>  
> 
>  -c ../../gcc-4.1.1/gcc/crtstuff.c -DCRT_BEGIN \
>  -o crtbegin.o
> In file included from ../../gcc-4.1.1/gcc/crtstuff.c:68:
> .../../gcc-4.1.1/gcc/tsystem.h:90:19: error: stdio.h: 没有那个文件或目录
> .../../gcc-4.1.1/gcc/tsystem.h:93:23: error: sys/types.h: 没有那个文件或目录
> .../../gcc-4.1.1/gcc/tsystem.h:96:19: error: errno.h: 没有那个文件或目录
> .../../gcc-4.1.1/gcc/tsystem.h:103:20: error: string.h: 没有那个文件或目录
> .../../gcc-4.1.1/gcc/tsystem.h:104:20: error: stdlib.h: 没有那个文件或目录
> .../../gcc-4.1.1/gcc/tsystem.h:105:20: error: unistd.h: 没有那个文件或目录
> In file included from
> /opt/cross_src4.1.1/gcc-build/./gcc/include/syslimits.h:7,
>                 from /opt/cross_src4.1.1/gcc-build/./gcc/include/limits.h:11,
>                 from ../../gcc-4.1.1/gcc/tsystem.h:108,
>                 from ../../gcc-4.1.1/gcc/crtstuff.c:68:
> /opt/cross_src4.1.1/gcc-build/./gcc/include/limits.h:122:61: error: limits.h:
> 没 有那个文件或目录
> In file included from ../../gcc-4.1.1/gcc/crtstuff.c:68:
> .../../gcc-4.1.1/gcc/tsystem.h:111:18: error: time.h: 没有那个文件或目录
> make[1]: *** [crtbegin.o] 错误 1
> make[1]: Leaving directory `/opt/cross_src4.1.1/gcc-build/gcc'
> make: *** [all-gcc] 错误 2
> 
> what should i do??  thanks for your help ! thank you

 It would raise the probability of someone being able to provide you some 
help if you set your locale to English before reporting error messages.

  Maciej

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cross compiling gcc for mips
  2006-07-18 10:53 ` Maciej W. Rozycki
@ 2006-07-18 12:47   ` Fuxin Zhang
  0 siblings, 0 replies; 9+ messages in thread
From: Fuxin Zhang @ 2006-07-18 12:47 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: qi tao, linux-mips

They are "No such file or directory" :)

Maciej W. Rozycki 写道:
> On Tue, 18 Jul 2006, qi tao wrote:
> 
>> However when I do "make all-gcc" I get the following errors:
>>  
>>
>>  -c ../../gcc-4.1.1/gcc/crtstuff.c -DCRT_BEGIN \
>>  -o crtbegin.o
>> In file included from ../../gcc-4.1.1/gcc/crtstuff.c:68:
>> .../../gcc-4.1.1/gcc/tsystem.h:90:19: error: stdio.h: 没有那个文件或目录
>> .../../gcc-4.1.1/gcc/tsystem.h:93:23: error: sys/types.h: 没有那个文件或目录
>> .../../gcc-4.1.1/gcc/tsystem.h:96:19: error: errno.h: 没有那个文件或目录
>> .../../gcc-4.1.1/gcc/tsystem.h:103:20: error: string.h: 没有那个文件或目录
>> .../../gcc-4.1.1/gcc/tsystem.h:104:20: error: stdlib.h: 没有那个文件或目录
>> .../../gcc-4.1.1/gcc/tsystem.h:105:20: error: unistd.h: 没有那个文件或目录
>> In file included from
>> /opt/cross_src4.1.1/gcc-build/./gcc/include/syslimits.h:7,
>>                 from /opt/cross_src4.1.1/gcc-build/./gcc/include/limits.h:11,
>>                 from ../../gcc-4.1.1/gcc/tsystem.h:108,
>>                 from ../../gcc-4.1.1/gcc/crtstuff.c:68:
>> /opt/cross_src4.1.1/gcc-build/./gcc/include/limits.h:122:61: error: limits.h:
>> 没 有那个文件或目录
>> In file included from ../../gcc-4.1.1/gcc/crtstuff.c:68:
>> .../../gcc-4.1.1/gcc/tsystem.h:111:18: error: time.h: 没有那个文件或目录
>> make[1]: *** [crtbegin.o] 错误 1 ==> error 1
>> make[1]: Leaving directory `/opt/cross_src4.1.1/gcc-build/gcc'
>> make: *** [all-gcc] 错误 2  ==> error 2
>>
>> what should i do??  thanks for your help ! thank you
> 
>  It would raise the probability of someone being able to provide you some 
> help if you set your locale to English before reporting error messages.
> 
>   Maciej

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cross compiling gcc for mips
  2006-07-18  7:12 qi tao
  2006-07-18 10:53 ` Maciej W. Rozycki
@ 2006-07-19 18:35 ` James E Wilson
  1 sibling, 0 replies; 9+ messages in thread
From: James E Wilson @ 2006-07-19 18:35 UTC (permalink / raw)
  To: qi tao; +Cc: linux-mips

On Tue, 2006-07-18 at 00:12, qi tao wrote:
> First I built binutils and now I was setting up the bootstrap compiler.
> In file included from ../../gcc-4.1.1/gcc/crtstuff.c:68:
> .../../gcc-4.1.1/gcc/tsystem.h:90:19: error: stdio.h: 没有那个文件或目录

You can't build the gcc libraries unless you have a C library first. 
And, of course, you can't build a C library unless you have a compiler
first.  This circular dependency makes bootstrapping a bit tricky.  

The basic process here is that you have to do a glibc make
install-headers first which gives you C library headers, and then a
partial gcc build minus the libraries, then a full glibc build, then a
full gcc build.

This is simpler is you just follow instructions written up by someone
else who already knows how to do it.  The one I recommend is the
crosstool scrips written by Dan Kegel.  There is a pointer to them on
the linux-mips.org wiki.
    http://www.linux-mips.org/wiki/Toolchains
    http://kegel.com/crosstool/
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-07-19 18:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-31 11:32 cross compiling gcc for mips Mudeem Iqbal
2005-01-02 16:54 ` Scott Parker
2005-01-02 17:01   ` Stephen P. Becker
2005-01-02 17:46     ` Gilad Rom
  -- strict thread matches above, loose matches on Subject: below --
2005-01-03  4:40 Mudeem Iqbal
2006-07-18  7:12 qi tao
2006-07-18 10:53 ` Maciej W. Rozycki
2006-07-18 12:47   ` Fuxin Zhang
2006-07-19 18:35 ` James E Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox