cygwin arm-elf-linux gcc build failure

John Andrews john@triscend.com
Wed Mar 21 04:56:00 GMT 2001


Hi All,

I've made it past a number of cross gcc build errors based on the sage
advice (both to myself and others) from the ubergeeks of this list. Many
Thanks!

But now I'm stumped again. After rereading all of the archives, FAQs and
assorted web pages I can't get a clue regarding this one.

Binutils built and installed without incident using the default destination.

The gcc build is now making it to libgcc2 and barfs on something in
gthr-posix.h. I've tried running dos2unix CRLF -> CR converter on just this
file, and also on all of the headers. The converted file sizes are the same
as the preconverted and it doesn't change the error.

In addition to installing binutils I've:

# change Hint to ARM_Hint in /usr/src/gcc-2.95.2/gcc/config/arm/arm.h and .c
gvim&
# make linux and asm links in /usr/local/arm-elf-linux/include, 
# usr/local/include doesn't seem to be searched by xgcc for libgcc1
# missing asm/unistd.h
cd /usr/local/arm-elf-linux
mkdir include
cd include
ln -s /usr/src/uClinux-2.4.x/include/linux
ln -s /usr/src/uClinux-2.4.x/include/asm-armnommu asm
# I guess we're going with newlib for now
# copy headers to include missing stdlib.h and unistd.h for libgcc2
cp -r /usr/src/newlib-1.9.0/newlib/libc/include/*
/usr/local/arm-elf-linux/include
#configure gcc
cd /usr/src/build-2.4.x/gcc
../../gcc-2.95.2/configure --target=arm-elf-linux \
      --enable-languages=c \
      -v 2>&1 | tee configure.out
# make
make LANGUAGES=c | tee make.out

Then it chokes with the output listed below. I did notice that the binutils
configure named the host as i686-pc-cygwin, while the gcc configure called
it i686-pc-cygwin32. I don't know if this makes a difference or not.

Many Many Thanks for your irreplaceable help...

John E. A.

...snip - gcc make output
...
_trampoline
__main
_exit
_ctors
_pure
for name in _eh; \
do \
  echo ${name}; \
  /usr/src/build-2.4.x/gcc/gcc/xgcc -B/usr/src/build-2.4.x/gcc/gcc/
-B/usr/local
/arm-elf-linux/bin/ -I/usr/local/arm-elf-linux/include -O2  -DCROSS_COMPILE
-DIN
_GCC     -save-temps -I./include  -fomit-frame-pointer -fPIC -g0
-DHAVE_GTHR_DEF
AULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED    -fexceptions -I.
-I../../../gcc-2.
95.2/gcc -I../../../gcc-2.95.2/gcc/config
-I../../../gcc-2.95.2/gcc/../include -
c \
      -DL${name} ../../../gcc-2.95.2/gcc/libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  arm-elf-linux-ar rc tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_eh
In file included from gthr-default.h:1,
                 from ../../../gcc-2.95.2/gcc/gthr.h:98,
                 from ../../../gcc-2.95.2/gcc/libgcc2.c:3034:
../../../gcc-2.95.2/gcc/gthr-posix.h:39: parse error before
`__gthread_key_t'
../../../gcc-2.95.2/gcc/gthr-posix.h:39: warning: data definition has no
type or
 storage class
../../../gcc-2.95.2/gcc/gthr-posix.h:40: parse error before
`__gthread_once_t'
../../../gcc-2.95.2/gcc/gthr-posix.h:40: warning: data definition has no
type or
 storage class
../../../gcc-2.95.2/gcc/gthr-posix.h:41: parse error before
`__gthread_mutex_t'
../../../gcc-2.95.2/gcc/gthr-posix.h:41: warning: data definition has no
type or
 storage class
../../../gcc-2.95.2/gcc/gthr-posix.h:59: `pthread_create' undeclared here
(not i
n a function)
../../../gcc-2.95.2/gcc/gthr-posix.h:78: parse error before `*'
../../../gcc-2.95.2/gcc/gthr-posix.h:78: parse error before `)'
../../../gcc-2.95.2/gcc/gthr-posix.h:87: parse error before `*'
../../../gcc-2.95.2/gcc/gthr-posix.h:87: parse error before `)'
../../../gcc-2.95.2/gcc/gthr-posix.h:93: parse error before `key'
../../../gcc-2.95.2/gcc/gthr-posix.h: In function `__gthread_key_dtor':
../../../gcc-2.95.2/gcc/gthr-posix.h:96: `ptr' undeclared (first use in this
fun
ction)
../../../gcc-2.95.2/gcc/gthr-posix.h:96: (Each undeclared identifier is
reported
 only once
../../../gcc-2.95.2/gcc/gthr-posix.h:96: for each function it appears in.)
../../../gcc-2.95.2/gcc/gthr-posix.h:97: `key' undeclared (first use in this
fun
ction)
../../../gcc-2.95.2/gcc/gthr-posix.h: At top level:
../../../gcc-2.95.2/gcc/gthr-posix.h:103: parse error before `key'
../../../gcc-2.95.2/gcc/gthr-posix.h: In function `__gthread_key_delete':
../../../gcc-2.95.2/gcc/gthr-posix.h:105: `key' undeclared (first use in
this fu
nction)
../../../gcc-2.95.2/gcc/gthr-posix.h: At top level:
../../../gcc-2.95.2/gcc/gthr-posix.h:109: parse error before `key'
../../../gcc-2.95.2/gcc/gthr-posix.h: In function `__gthread_getspecific':
../../../gcc-2.95.2/gcc/gthr-posix.h:111: `key' undeclared (first use in
this fu
nction)
../../../gcc-2.95.2/gcc/gthr-posix.h:111: warning: return makes pointer from
int
eger without a cast
../../../gcc-2.95.2/gcc/gthr-posix.h: At top level:
../../../gcc-2.95.2/gcc/gthr-posix.h:115: parse error before `key'
../../../gcc-2.95.2/gcc/gthr-posix.h: In function `__gthread_setspecific':
../../../gcc-2.95.2/gcc/gthr-posix.h:117: `key' undeclared (first use in
this fu
nction)
../../../gcc-2.95.2/gcc/gthr-posix.h:117: `ptr' undeclared (first use in
this fu
nction)
../../../gcc-2.95.2/gcc/gthr-posix.h: At top level:
../../../gcc-2.95.2/gcc/gthr-posix.h:121: parse error before `*'
../../../gcc-2.95.2/gcc/gthr-posix.h: In function `__gthread_mutex_lock':
../../../gcc-2.95.2/gcc/gthr-posix.h:124: `mutex' undeclared (first use in
this
function)
../../../gcc-2.95.2/gcc/gthr-posix.h: At top level:
../../../gcc-2.95.2/gcc/gthr-posix.h:130: parse error before `*'
../../../gcc-2.95.2/gcc/gthr-posix.h: In function `__gthread_mutex_trylock':
../../../gcc-2.95.2/gcc/gthr-posix.h:133: `mutex' undeclared (first use in
this
function)
../../../gcc-2.95.2/gcc/gthr-posix.h: At top level:
../../../gcc-2.95.2/gcc/gthr-posix.h:139: parse error before `*'
../../../gcc-2.95.2/gcc/gthr-posix.h: In function `__gthread_mutex_unlock':
../../../gcc-2.95.2/gcc/gthr-posix.h:142: `mutex' undeclared (first use in
this
function)
../../../gcc-2.95.2/gcc/libgcc2.c: At top level:
../../../gcc-2.95.2/gcc/libgcc2.c:3109: parse error before `eh_context_key'
../../../gcc-2.95.2/gcc/libgcc2.c:3109: warning: data definition has no type
or
storage class
../../../gcc-2.95.2/gcc/libgcc2.c: In function `eh_context_initialize':
../../../gcc-2.95.2/gcc/libgcc2.c:3171: syntax error before `once'
../../../gcc-2.95.2/gcc/libgcc2.c:3175: `once' undeclared (first use in this
fun
ction)
make[3]: *** [libgcc2.a] Error 1
make[3]: Leaving directory `/usr/src/build-2.4.x/gcc/gcc'
make[2]: *** [stmp-multilib-sub] Error 2
make[2]: Leaving directory `/usr/src/build-2.4.x/gcc/gcc'
make[1]: *** [stmp-multilib] Error 1
make[1]: Leaving directory `/usr/src/build-2.4.x/gcc/gcc'
make: *** [all-gcc] Error 2
...end snip

Thanks Again!!!

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list