From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19237 invoked by alias); 31 Mar 2009 07:29:11 -0000 Received: (qmail 19226 invoked by uid 22791); 31 Mar 2009 07:29:10 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_22,J_CHICKENPOX_33,J_CHICKENPOX_52,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-fx0-f165.google.com (HELO mail-fx0-f165.google.com) (209.85.220.165) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Mar 2009 07:29:05 +0000 Received: by fxm9 with SMTP id 9so2182164fxm.8 for ; Tue, 31 Mar 2009 00:29:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.165.18 with SMTP id s18mr2110077muo.124.1238484542429; Tue, 31 Mar 2009 00:29:02 -0700 (PDT) In-Reply-To: <7238340b0903310000i6034b1d3r240e1a510ff01af3@mail.gmail.com> References: <7238340b0903302319u1a887a8bq53fcfad8953dce8e@mail.gmail.com> <8502af3c0903302351m3c8912ddj8db32ff56947d6d3@mail.gmail.com> <7238340b0903310000i6034b1d3r240e1a510ff01af3@mail.gmail.com> Date: Tue, 31 Mar 2009 07:29:00 -0000 Message-ID: <8502af3c0903310029p79cb9e0dr92f656b4fc91bf76@mail.gmail.com> Subject: Re: error while x-compiling libgcc2.c From: Florent DEFAY To: ganesh gopalasubramanian Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-03/txt/msg00397.txt.bz2 > 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 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