Hi all,

I'm attempting to compile a cross toolchain to build eCos. The target platform 
is sparc, and the host system is cygwin.

I've followed the instructions as per the recommended method on the site, but 
am running into a strange issue while gcc is building libraries. The problem is 
that the cross compiler segfaults at a point in the process.

It attempts to build three versions of libiberty. One version each under "v8", 
"soft" and "soft/v8". I'm not entirely sure what the differences are between 
these three. The first two, "v8" and "soft" are built fine, however, the 
problem arises when it gets to building the libraries for "soft/v8". The only 
difference when it's doing this "version" of the libiberty library is that it 
uses the -msoft-float option. The intermediate cross compiler that gets built, 
xgcc, segaults on the file libiberty/regex.c.  

I'm building with binutils-2.19, gcc-3.2.1 and newlib-1.11.0.

GCC was configured like so (verbose output from the cross compiler):

xgcc.exe -v      
Using built-in specs.
Configured with: /home/jules/scratch/rachael-toolchain/gcc-3.2.1/configure 
--target=sparc-elf --prefix=/home/jules/scratch/rachael-toolchain/sparc-elf 
--with-gnu-as --with-gnu-ld --disable-nls --with-newlib 
--enable-languages=c,c++ --disable-shared 
--with-gxx-include-dir=/home/jules/scratch/rachael-toolchain/sparc-elf/sparc-elf/include
 -v
Thread model: single
gcc version 3.2.1


Here is the offending command and resulting output that crashes the compile:

/home/jules/scratch/rachael-toolchain/b-gcc/gcc/xgcc 
-B/home/jules/scratch/rachael-toolchain/b-gcc/gcc/ -nostdinc 
-B/home/jules/scratch/rachael-toolchain/b-gcc/sparc-elf/newlib/ -isystem 
/home/jules/scratch/rachael-toolchain/b-gcc/sparc-elf/newlib/targ-include 
-isystem /home/jules/scratch/rachael-toolchain/gcc-3.2.1/newlib/libc/include 
-B/home/jules/scratch/rachael-toolchain/sparc-elf/sparc-elf/bin/ 
-B/home/jules/scratch/rachael-toolchain/sparc-elf/sparc-elf/lib/ -isystem 
/home/jules/scratch/rachael-toolchain/sparc-elf/sparc-elf/include -c 
-DHAVE_CONFIG_H -O2 -g -O2  -msoft-float -mcpu=v8 -I. 
-I/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/../include  -W 
-Wall -Wtraditional -pedantic 
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c
In file included from 
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/include/xregex.h:26,
                 from 
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:195:
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/include/xregex2.h:551: warning: 
ISO C89 does not support `static' or type qualifiers in parameter array 
declarators
In file included from 
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:649:
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c: In function 
`byte_regex_compile':
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:2527: 
warning: implicit declaration of function `free'
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:2588: 
warning: function `free' was previously declared within a block
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:2621: 
warning: function `free' was previously declared within a block
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:2728: 
warning: function `free' was previously declared within a block
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:3731: 
warning: function `free' was previously declared within a block
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:4238: 
warning: function `free' was previously declared within a block
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c: In function 
`byte_compile_range':
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:4602: 
warning: signed and unsigned type in conditional expression
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:4612: 
warning: signed and unsigned type in conditional expression
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:4612: 
warning: signed and unsigned type in conditional expression
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c: In function 
`byte_re_compile_fastmap':
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:4952: 
warning: implicit declaration of function `abort'
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c: In function 
`byte_re_match_2_internal':
/home/jules/scratch/rachael-toolchain/gcc-3.2.1/libiberty/regex.c:7630: 
internal error: Segmentation fault

I understand that this post might be better suited to a gcc mailing list, but 
seeing as this is an old version of gcc and is recommended to be used when 
compiling eCos I thought perhaps others might know about these kinds of strange 
things with this version.

I've seen the cross compiler get used with the -msoft-float option earlier in 
the compile process without error, so I'm at a loss as to why it's doing it 
here. I'm sure it's not to do with running out of memory or disk space.

Thanks in advance for any assistance.



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply via email to