This is the mail archive of the
crossgcc@sourceware.org
mailing list for the crossgcc project.
See the CrossGCC FAQ for lots
more information.
mips assembly produced on a linux x86
- From: Nick Brockner <nbrockne at hamilton dot edu>
- To: crossgcc at sourceware dot org
- Date: Wed, 12 Mar 2008 12:49:54 -0400
- Subject: mips assembly produced on a linux x86
Hi All,
I need to install a separate cross compiler on a Fedora Core 5 Linux box
(2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 i686
i386 GNU/Linux)
So, I need a version of GCC that will only be run with the -S flag to
make assembly output (edu environment) and not interfere with the
currrently installed version of gcc on the box.
I have spent a bit of time on this, and have the latest tarballs of GCC,
newlib, and binutils. However, I am running into issues when building
the cross-compiler, and I am wondering if there is an easier way to go
about this, especially since I only need gcc to produce assembly files
for little endian mips targets.
I am using $TARGET=mipsel-linux and $PREFIX=/opt/crossgcc when building
binutils and gcc, using these instructions found in another posting:
(http://www.nabble.com/Build-my-own-cross-compiler-for-non-Linux-Targets-(MIPS,-ARM,-PPC)-td14168870.html):
PREFIX=/opt/crossgcc
TARGET=mipsel-linux
BINUTILS_VER=2.18
GCC_VER=4.3.0
NEWLIB_VER=1.16.0
tar xjf binutils-${BINUTILS_VER}.tar.bz2
mkdir build
cd build
../binutils-${BINUTILS_VER}/configure --prefix=$PREFIX --target=$TARGET
make
make install
cd ..
rm -rf binutils-${BINUTILS_VER} build
PATH=$PREFIX/bin:$PATH
tar xzf newlib-${NEWLIB_VER}.tar.gz
mv newlib-${NEWLIB_VER} gcc-${GCC_VER}
tar xjf gcc-core-${GCC_VER}.tar.bz2
mkdir build
cd build
../gcc-${GCC_VER}/configure --prefix=$PREFIX --target=$TARGET
make
make install
cd ..
rm -rf build gcc-${GCC_VER}
I get this error late in the gcc build process:
--------snip-----------
-DHAVE_CC_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF
unwind-dw2.dep -fexceptions -c
../../../gcc-4.3.0/libgcc/../gcc/unwind-dw2.c -fvisibility=hidden
-DHIDE_EXPORTS
In file included from ../.././gcc/gthr-default.h:1,
from ../../../gcc-4.3.0/libgcc/../gcc/gthr.h:132,
from ../../../gcc-4.3.0/libgcc/../gcc/unwind-dw2.c:42:
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:43:21: error: pthread.h:
No such file or directory
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:44:20: error: unistd.h: No
such file or directory
In file included from ../.././gcc/gthr-default.h:1,
from ../../../gcc-4.3.0/libgcc/../gcc/gthr.h:132,
from ../../../gcc-4.3.0/libgcc/../gcc/unwind-dw2.c:42:
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:46: error: expected â=â,
â,â, â;â, âasmâ or â__attribute__â before â__gthread_key_tâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:47: error: expected â=â,
â,â, â;â, âasmâ or â__attribute__â before â__gthread_once_tâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:48: error: expected â=â,
â,â, â;â, âasmâ or â__attribute__â before â__gthread_mutex_tâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:49: error: expected â=â,
â,â, â;â, âasmâ or â__attribute__â before â__gthread_recursive_mutex_tâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:50: error: expected â=â,
â,â, â;â, âasmâ or â__attribute__â before â__gthread_cond_tâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:100: error: âpthread_onceâ
undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:100: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_onceâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:101: error:
âpthread_getspecificâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:101: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_getspecificâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:102: error:
âpthread_setspecificâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:102: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_setspecificâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:103: error:
âpthread_createâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:103: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_createâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:104: error:
âpthread_cancelâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:104: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_cancelâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:105: error:
âpthread_mutex_lockâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:105: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_mutex_lockâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:106: error:
âpthread_mutex_trylockâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:106: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_mutex_trylockâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:107: error:
âpthread_mutex_unlockâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:107: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_mutex_unlockâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:108: error:
âpthread_mutex_initâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:108: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_mutex_initâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:109: error:
âpthread_cond_broadcastâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:109: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_cond_broadcastâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:110: error:
âpthread_cond_waitâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:110: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_cond_waitâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:113: error:
âpthread_key_createâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:113: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_key_createâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:114: error:
âpthread_key_deleteâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:114: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_key_deleteâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:115: error:
âpthread_mutexattr_initâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:115: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_mutexattr_initâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:116: error:
âpthread_mutexattr_settypeâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:116: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_mutexattr_settypeâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:117: error:
âpthread_mutexattr_destroyâ undeclared here (not in a function)
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:117: warning: type
defaults to âintâ in declaration of â__gthrw_pthread_mutexattr_destroyâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:647: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:656: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:662: error: expected â)â
before âkeyâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:668: error: expected â)â
before âkeyâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:674: error: expected â)â
before âkeyâ
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:680: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:689: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:698: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:708: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:729: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:735: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:741: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:747: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:753: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/gthr-posix.h:759: error: expected â)â
before â*â token
../../../gcc-4.3.0/libgcc/../gcc/unwind-dw2.c: In function
âuw_init_context_1â:
../../../gcc-4.3.0/libgcc/../gcc/unwind-dw2.c:1432: error: expected â=â,
â,â, â;â, âasmâ or â__attribute__â before âonce_regsizesâ
../../../gcc-4.3.0/libgcc/../gcc/unwind-dw2.c:1432: error:
âonce_regsizesâ undeclared (first use in this function)
../../../gcc-4.3.0/libgcc/../gcc/unwind-dw2.c:1432: error: (Each
undeclared identifier is reported only once
../../../gcc-4.3.0/libgcc/../gcc/unwind-dw2.c:1432: error: for each
function it appears in.)
../../../gcc-4.3.0/libgcc/../gcc/unwind-dw2.c:1432: error:
âPTHREAD_ONCE_INITâ undeclared (first use in this function)
../../../gcc-4.3.0/libgcc/../gcc/unwind-dw2.c:1433: warning: implicit
declaration of function â__gthread_onceâ
make[2]: *** [unwind-dw2.o] Error 1
make[2]: Leaving directory `/opt/crossgcc/build/mipsel-linux/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/opt/crossgcc/build'
make: *** [all] Error 2
-------------end snip---------------------
Any help is greatly appreciated.
Thanks.
--
For unsubscribe information see http://sourceware.org/lists.html#faq