This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: error while x-compiling libgcc2.c


> We tried building the libraries using the make script and it ended up
> with the error. For debugging we compiled the file (libgcc2.c) in the
> path and it went on fine. Any idea about this situation?

Do you mean 'make' ended up with error and compiling libgcc2.c alone
comes to no problem ?
How do you perform debugging ?
The easiest way I know is
1- make
2- select the last compilation (the one which provokes error)
3-run gdb --arg [last compilation]

Here is a cancrete example:

/home/guest1/gcc/build_target/./gcc/xgcc
-B/home/guest1/gcc/build_target/./gcc/
-B/home/guest1/target/target/bin/ -B/home/guest1/target/target/lib/
-isystem /home/guest1/target/target/include -isystem
/home/guest1/target/target/sys-include -O2 -g -g -O2 -O2  -O2 -g -g
-O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include   -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc  -I. -I. -I../.././gcc -I../../../gcc-4.3.3/libgcc
-I../../../gcc-4.3.3/libgcc/. -I../../../gcc-4.3.3/libgcc/../gcc
-I../../../gcc-4.3.3/libgcc/../include   -o _muldi3.o -MT _muldi3.o
-MD -MP -MF _muldi3.dep -DL_muldi3 -c
../../../gcc-4.3.3/libgcc/../gcc/libgcc2.c \

xgcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [_muldi3.o] Error 1
...

prompt$ gdb --args /home/guest1/gcc/build_target/./gcc/xgcc
-B/home/guest1/gcc/build_target/./gcc/
-B/home/guest1/target/target/bin/ -B/home/guest1/target/target/lib/
-isystem /home/guest1/target/target/include -isystem
/home/guest1/target/target/sys-include -O2 -g -g -O2 -O2  -O2 -g -g
-O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include   -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc  -I. -I. -I../.././gcc -I../../../gcc-4.3.3/libgcc
-I../../../gcc-4.3.3/libgcc/. -I../../../gcc-4.3.3/libgcc/../gcc
-I../../../gcc-4.3.3/libgcc/../include   -o _muldi3.o -MT _muldi3.o
-MD -MP -MF _muldi3.dep -DL_muldi3 -c
../../../gcc-4.3.3/libgcc/../gcc/libgcc2.c

Here is the complete list of patterns I implemented and are sufficient
(in my case) to compile libgcc:
movqi,hi,si,di
exetendqihi2,hisi2,sidi2
zero_extendqihi2,hisi2,sidi2
add,sub,neg in qi,hi,si,di modes
mulhi,si
umulqihi3,hisi3,sidi3
divmodqi4,hi4
jump
indirect_jump
cmphi
all branch
all reverse branch
prologue,epilogue,call,call_value,nop.

Regards.

Florent


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