Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Anyone succesful in Cross-compiling GCC 3.2 to MIPS (Solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
marsclic
n00b
n00b


Joined: 02 Mar 2003
Posts: 72

PostPosted: Wed Sep 22, 2004 9:35 am    Post subject: Anyone succesful in Cross-compiling GCC 3.2 to MIPS (Solved) Reply with quote

I am trying to get a cross-toolset for the MIPS32 arch on an embedded processor. I was able to cross-compile GCC 2.95.3, but GCC versions 3.2 and 3.4.X give me the same errors:

-------------------------------------------------------------------------------
In file included from ../../gcc-3.4.2/gcc/gthr-posix.h:44,
from ./gthr-default.h:1,
from ../../gcc-3.4.2/gcc/gthr.h:96,
from ../../gcc-3.4.2/gcc/unwind-dw2.c:42:
/mipsel-linux/tools/mipsel-linux/sys-include/unistd.h:503: error: parse error before "__THROW"

...

In file included from ./gthr-default.h:1,
from ../../gcc-3.4.2/gcc/gthr.h:96,
from ../../gcc-3.4.2/gcc/unwind-dw2.c:42:
../../gcc-3.4.2/gcc/gthr-posix.h:46: error: syntax error before "typedef"
../../gcc-3.4.2/gcc/gthr-posix.h: In function `__gthread_once':
../../gcc-3.4.2/gcc/gthr-posix.h:459: warning: implicit declaration of function `pthread_once'
../../gcc-3.4.2/gcc/gthr-posix.h: In function `__gthread_key_create':
../../gcc-3.4.2/gcc/gthr-posix.h:467: warning: implicit declaration of function `pthread_key_create'
../../gcc-3.4.2/gcc/gthr-posix.h: In function `__gthread_key_delete':
../../gcc-3.4.2/gcc/gthr-posix.h:473: warning: implicit declaration of function `pthread_key_delete'
../../gcc-3.4.2/gcc/gthr-posix.h: In function `__gthread_getspecific':
../../gcc-3.4.2/gcc/gthr-posix.h:479: warning: implicit declaration of function `pthread_getspecific'
../../gcc-3.4.2/gcc/gthr-posix.h:479: warning: return makes pointer from integer without a cast
../../gcc-3.4.2/gcc/gthr-posix.h: In function `__gthread_setspecific':
../../gcc-3.4.2/gcc/gthr-posix.h:485: warning: implicit declaration of function `pthread_setspecific'
../../gcc-3.4.2/gcc/gthr-posix.h: In function `__gthread_mutex_lock':
../../gcc-3.4.2/gcc/gthr-posix.h:492: warning: implicit declaration of function `pthread_mutex_lock'
../../gcc-3.4.2/gcc/gthr-posix.h: In function `__gthread_mutex_trylock':
../../gcc-3.4.2/gcc/gthr-posix.h:501: warning: implicit declaration of function `pthread_mutex_trylock'
../../gcc-3.4.2/gcc/gthr-posix.h: In function `__gthread_mutex_unlock':
../../gcc-3.4.2/gcc/gthr-posix.h:510: warning: implicit declaration of function `pthread_mutex_unlock'
../../gcc-3.4.2/gcc/unwind-dw2.c: In function `uw_frame_state_for':
../../gcc-3.4.2/gcc/unwind-dw2.c:1008: warning: implicit declaration of function `memset'
../../gcc-3.4.2/gcc/unwind-dw2.c: In function `uw_install_context_1':
../../gcc-3.4.2/gcc/unwind-dw2.c:1336: warning: implicit declaration of function `memcpy'
make[2]: *** [libgcc/./unwind-dw2.o] Error 1
make[2]: Leaving directory `/home/marius/work/seekernet/build-tools/mipsel-boot-gcc-3.4.2/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/home/marius/work/seekernet/build-tools/mipsel-boot-gcc-3.4.2/gcc'
make: *** [all-gcc] Error 2
---------------------------------------------------------------

I tried --with-headers and --without-headers, --with-newlib, but I wasn't able to make it work yet. Has anyone?
Back to top
View user's profile Send private message
marsclic
n00b
n00b


Joined: 02 Mar 2003
Posts: 72

PostPosted: Thu Sep 30, 2004 7:05 am    Post subject: Kernel version for MIPS32? Reply with quote

Using the crosstool scripts (http://kegel.com/crosstool/) I was able to use gcc-3.4.1, glibc-2.3.2 and binutils-2.15 to generate a mips32 little-endian cross-compiler. I am using a Gentoo gcc-3.4.2 i686 host.
The problem now is to find a kernel that will compile under the cross-compiler! I tried 2.4.25, 2.4.27, 2.6.8 and 2.6.9-rc2-mm4, but the compile always breaks along the way. Success stories anyone?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum