This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cpp segfaults during bootstrap on ARM... (fwd)



> I've been unable to build the mainline on a NetWinder for the last
> two days.  CPP segfaults during the bootstrap.  I configured with:
> CFLAGS="-g -O0" ../gcc-2.96/configure --with-cpu=strongarm
> --enable-shared.  and did a make bootstrap-lean

> 
> do \
>   echo ${name}; \
>   ./xgcc -B/usr/local/armv4l-unknown-linux-gnu/bin/ -B./ -isystem
> /usr/local/armv4l-unknown-linux-gnu/include -O2   -DIN_GCC    -g -W -Wall
> - -Wtraditional -isystem ./include  -fomit-frame-pointer -fPIC -g0
> - -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I.
> - -I../../gcc-2.96/gcc -I../../gcc-2.96/gcc/config
> - -I../../gcc-2.96/gcc/../include -c -DL${name} \
>        ../../gcc-2.96/gcc/libgcc2.c -o ${name}.o; \
>   if [ $? -eq 0 ] ; then true; else exit 1; fi; \
>   ar  rc tmplibgcc2.a ${name}.o; \
>   rm -f ${name}.o; \
> done
> _muldi3
> cpp: memory violation at pc=0x4006ff54, lr=0x02073eb0 (bad 
> address=0x0207471c, code 0)
> xgcc: Internal compiler error: program cpp got fatal signal 11

> To date I have not had any success in debugging this problem.  cpp
> is failing in chunk_alloc in libc.  The return address (lr) and the
> bad address are way outside the valid range for code and data for
> cpp.

How'd you get that nice 'memory violation ...' message?  I wish my
kernel would do that.

> I have not been able to get the CPP command to run from the
> prompt or gdb.  I always get:
> 
> /bin/bash: -c: line 1: syntax error near unexpected token `-Asystem(u'
> /bin/bash: -c: line 1: `exec /home/scottb/cvstree/gcc-2.96-build/gcc/./cpp

This is caused by this part of the command line:

> -Asystem(unix) -Asystem(posix) -Acpu(arm) -Amachine(arm)

The syntax of -A clashes with the shell.  It's not a problem when cpp
is run from inside gcc, because gcc doesn't go through the shell.  You
must either single-quote each of these arguments separately, or delete
them all.  (-A has to do with an obscure SysV extension which no one
uses.)

A failure in chunk_alloc probably means cpp scribbled on malloc's data
structures.  I've had good luck tracking these down with Electric
Fence, if you have that available.  Libc's malloc also has a
paranoid mode, but it isn't nearly as good.

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]