gcc cross-compiler for linux
Xavier Otazu
xotazu at cvc.uab.es
Mon Nov 24 10:19:11 PST 2008
Hello,
I would like to compile a C++ code to be executed within the linux
emulator.
I tried to install the cross-gcc port, but when building I always receive the same
compilation error related to gthreads.
I use the following options when compiling the cross-gcc port:
make TGTARCH=i386 TGTABI=linux install clean
I also tried several combinations like "i386-pc" and "linux-gnu".
When building, I get the following error message:
/usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/xgcc
-B/usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/
-B/usr/local/i386-linux/bin/ -B/usr/local/i386-linux/lib/
-isystem /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc
-isystem /usr/local/i386-linux/include
-isystem /usr/local/i386-linux/sys-include -O2 -O2 -O2
-fno-strict-aliasing -pipe -DIN_GCC -DCROSS_COMPILE -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -isystem ./include -fPIC -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc -I. -I. -I../.././gcc -I../.././gcc/.
-I../.././gcc/../include -I../.././gcc/../libcpp/include
-I../.././gcc/../libdecnumber -I../libdecnumber -fexceptions
-c ../.././gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
In file included from /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/gthr-default.h:1,
from ../.././gcc/gthr.h:114,
from ../.././gcc/unwind-dw2.c:42:
../.././gcc/gthr-posix.h:43:21: error: pthread.h: No such file or directory
../.././gcc/gthr-posix.h:44:20: error: unistd.h: No such file or directory
In file included from /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/gthr-default.h:1,
from ../.././gcc/gthr.h:114,
from ../.././gcc/unwind-dw2.c:42:
../.././gcc/gthr-posix.h:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_key_t'
../.././gcc/gthr-posix.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_once_t'
../.././gcc/gthr-posix.h:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_mutex_t'
../.././gcc/gthr-posix.h:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_recursive_mutex_t'
../.././gcc/gthr-posix.h:92: error: 'pthread_once' undeclared here (not in a function)
../.././gcc/gthr-posix.h:93: error: 'pthread_getspecific' undeclared
here (not in a function)
Thank you in advance
Xavier
More information about the freebsd-questions
mailing list