From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3758 invoked by alias); 12 Oct 2006 17:28:43 -0000 Received: (qmail 3732 invoked by uid 22791); 12 Oct 2006 17:28:42 -0000 X-Spam-Check-By: sourceware.org Received: from pne-smtpout3-sn2.hy.skanova.net (HELO pne-smtpout3-sn2.hy.skanova.net) (81.228.8.111) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 12 Oct 2006 17:28:39 +0000 Received: from [10.0.0.3] (84.248.189.73) by pne-smtpout3-sn2.hy.skanova.net (7.2.075) id 451773CD000EC86F; Thu, 12 Oct 2006 19:28:31 +0200 Message-ID: <452E7D83.6050903@mbnet.fi> Date: Thu, 12 Oct 2006 17:28:00 -0000 From: Kai Ruottu User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Lars Poeschel CC: gcc-help@gcc.gnu.org Subject: Re: Error compiling gcc for fr30 References: <200610111119.02537.larsi@wh2.tu-dresden.de> In-Reply-To: <200610111119.02537.larsi@wh2.tu-dresden.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg00117.txt.bz2 Lars Poeschel wrote: > I want to build a cross compiler for fr30 architecture (including c++) and > configure in a separate build dir as follows: > .../gcc-4.1.1/configure --prefix=/usr/cross --target=fr30-unknown-elf --with-gnu-as --with-gnu-ld --enable-languages=c --disable-libssp > > Then is make and make install, which runs fine without any error. > Then I build newlib with my fresh fr30-unknown-elf-gcc and install it which > also runs fine. > > Then I configure gcc to build a c++ compiler: > .../gcc-4.1.1/configure --prefix=/usr/cross --target=fr30-unknown-elf --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-libssp --with-newlib > All this should work in two steps, the latter configure first with the generic newlib headers being preinstalled by copying them (with a single 'cp -r' command) and then producing newlib... And so the error you got : > /home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3/include/bits/fstream.tcc: > In member function 'typename std::basic_filebuf<_CharT, _Traits>::pos_type > std::basic_filebuf<_CharT, _Traits>::_M_seek(typename _Traits::off_type, > std::_Ios_Seekdir, typename _Traits::state_type) [with _CharT = char, _Traits > = std::char_traits]': > /home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3/include/bits/fstream.tcc:753: > error: insn does not satisfy its constraints: > (insn 191 190 23 > 0 /home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3/include/bits/postypes.h:117 > (set (mem/s/c:SI (plus:SI (reg/f:SI 14 fp [42]) > (const_int 4 [0x4])) [27 ._M_state+4 S4 A32]) > (reg:SI 2 r2 [orig:1+4 ] [1])) 6 {movsi_internal} (nil) > (expr_list:REG_DEAD (reg:SI 2 r2 [orig:1+4 ] [1]) > (nil))) > /home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3/include/bits/fstream.tcc:753: > internal compiler error: in copyprop_hardreg_forward_1, at regrename.c:1592 > would have appeared in the first "build the C and C++ compilers with libiberty and libstdc++-v3 for the target"-step. But then you maybe hadn't tried producing newlib with the "broken" GCC :-( The earlier GCC I had tried to produce for 'fr30-elf' was the gcc-3.3.3 in 2004 and also it crashed somewhere in the 'libstdc++-v3' build, just like the gcc-4.1.1 here too : /data1/home/src/gcc-4.1.1/build/fr30-elf/libstdc++-v3/include/bits/fstream.tcc:753: error: insn does not satisfy its constraints: (insn 191 190 23 0 /data1/home/src/gcc-4.1.1/build/fr30-elf/libstdc++-v3/include/bits/postypes.h:117 (set (mem/s/c:SI (plus:SI (reg/f:SI 14 fp [42]) (const_int 4 [0x4])) [27 ._M_state+4 S4 A32]) (reg:SI 2 r2 [orig:1+4 ] [1])) 6 {movsi_internal} (nil) (expr_list:REG_DEAD (reg:SI 2 r2 [orig:1+4 ] [1]) (nil))) /data1/home/src/gcc-4.1.1/build/fr30-elf/libstdc++-v3/include/bits/fstream.tcc:753: internal compiler error: in copyprop_hardreg_forward_1, at regrename.c:1592 So, if it helps in any way, someone else got just the same crash just in the same place :-) > Can somebody please explain this a little bit more ? Is there something wrong > with fr30's machine description ? Most probbably there is something wrong.... > Or did I something wrong compiling ? A similar error appears in all gcc versions since 4.0.0. > Your "optimization level" in compiling libstdc++-v3 was just the same '-Os' I had here, so it must come from somewhere and be 'fr30' dependent. Maybe changing it to '-O2' or to '-O' could help, I will check that... Anyway the '-Os' seems to cause a crash in libstdc++-v3 with 'fr30-elf' !