public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Error compiling gcc for fr30
@ 2006-10-11  9:19 Lars Poeschel
  2006-10-12 17:28 ` Kai Ruottu
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Poeschel @ 2006-10-11  9:19 UTC (permalink / raw)
  To: gcc-help

Hi all!
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
The following make aborts with this error:

/home/larsi/gcc/gcc-build/./gcc/xgcc -shared-libgcc -B/home/larsi/gcc/gcc-build/./gcc -nostdinc++ -L/home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3/src -L/home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3/src/.libs -B/usr/cross/fr30-unknown-elf/bin/ -B/usr/cross/fr30-unknown-elf/lib/ -isystem /usr/cross/fr30-unknown-elf/include -isystem /usr/cross/fr30-unknown-elf/sys-include -I/home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3/include/fr30-unknown-elf -I/home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3/include -I/home/larsi/gcc/gcc-4.1.1/libstdc++-v3/libsupc++ -g -Os -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -c ../../../../gcc-4.1.1/libstdc++-v3/src/fstream-inst.cc -o 
fstream-inst.o
/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<char>]':
/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 <result>._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
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [fstream-inst.lo] Fehler 1
make[4]: Leaving directory 
`/home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3/src'
make[3]: *** [all-recursive] Fehler 1
make[3]: Leaving directory 
`/home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory 
`/home/larsi/gcc/gcc-build/fr30-unknown-elf/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Fehler 2
make[1]: Leaving directory `/home/larsi/gcc/gcc-build'
make: *** [all] Fehler 2

Can somebody please explain this a little bit more ? Is there something wrong 
with fr30's machine description ? Or did I something wrong compiling ? A 
similar error appears in all gcc versions since 4.0.0.
Is it really a bug in gcc ? Should I file a bug report ?

Thanks,

Lars

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Error compiling gcc for fr30
  2006-10-11  9:19 Error compiling gcc for fr30 Lars Poeschel
@ 2006-10-12 17:28 ` Kai Ruottu
  2006-10-12 18:16   ` Kai Ruottu
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Ruottu @ 2006-10-12 17:28 UTC (permalink / raw)
  To: Lars Poeschel; +Cc: gcc-help

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<char>]':
> /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 <result>._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 <result>._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' !

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Error compiling gcc for fr30
  2006-10-12 17:28 ` Kai Ruottu
@ 2006-10-12 18:16   ` Kai Ruottu
  2006-10-12 18:36     ` Kai Ruottu
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Ruottu @ 2006-10-12 18:16 UTC (permalink / raw)
  To: Lars Poeschel; +Cc: gcc-help

Kai Ruottu wrote:
> 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' !
 Been there, seen that...  Only switching to '-O0' enabled the compile 
to succeed!  So I produced
this single module with -O0 and switching back to '-Os' with the next in 
turn helped only a while,
then it crashed again with:

/data1/home/src/gcc-4.1.1/build/fr30-elf/libstdc++-v3/include/bits/locale_facets.h: 
In member function '_InIter std::money_get<_CharT, 
_InIter>::get(_InIter, _InIter, bool, std::ios_base&, 
std::_Ios_Iostate&, long double&) const [with _CharT = char, _InIter = 
std::istreambuf_iterator<char, std::char_traits<char> >]':
/data1/home/src/gcc-4.1.1/build/fr30-elf/libstdc++-v3/include/bits/locale_facets.h:4023: 
error: insn does not satisfy its constraints:
(insn 140 139 78 0 (set (mem/s/c:SI (plus:SI (reg/f:SI 14 fp [orig:32 
D.35158 ][32])
                (const_int 4 [0x4])) [94 <result>+4 S4 A32])
        (reg:SI 2 r2 [orig:67+4 ] [67])) 6 {movsi_internal} (nil)
    (expr_list:REG_DEAD (reg:SI 2 r2 [orig:67+4 ] [67])
        (nil)))
/data1/home/src/gcc-4.1.1/build/fr30-elf/libstdc++-v3/include/bits/locale_facets.h:4023: 
internal compiler error: in copyprop_hardreg_forward_1, at regrename.c:1592

Compiling this too with '-O0' could help and then compiling again with 
'-Os' could get it forwards
to the next crash... Then the same thing again and again and finally the 
build could succeed... But
"What is broken, that is broken until being fixed!" :-(

Looking at the function 'copyprop_hardreg_forward_1()'  at 'regrename.c' 
and the line 1592 there
didn't help much. So making a bug report could help... BTW, the fr30 
port maintainer was told to
be Nick Clifton, nickc@redhat.com, so if you don't get any response, 
trying to contact him could
be one way, but maybe these crashes could have given enough info for 
some other to fix the
problem.  I myself have thought to learn the RTL "Really Soon Now" but 
let's see...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Error compiling gcc for fr30
  2006-10-12 18:16   ` Kai Ruottu
@ 2006-10-12 18:36     ` Kai Ruottu
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Ruottu @ 2006-10-12 18:36 UTC (permalink / raw)
  To: Lars Poeschel; +Cc: gcc-help

Kai Ruottu wrote:
> /data1/home/src/gcc-4.1.1/build/fr30-elf/libstdc++-v3/include/bits/locale_facets.h:4023: 
> internal compiler error: in copyprop_hardreg_forward_1, at 
> regrename.c:1592
>
> Compiling this too with '-O0' could help and then compiling again with 
> '-Os' could get it forwards
> to the next crash... Then the same thing again and again and finally 
> the build could succeed...

Only this and the last 'c++locale' seemed to require compiling them 
using '-O0'...  And the I had :

Dell:/data1/home/src/gcc-4.1.1/build # ls -l fr30-elf/libstdc++-v3/src/.libs
total 1152
drwxr-xr-x  2 root root    4096 2006-10-12 21:35 ./
drwxr-xr-x  3 root root    4096 2006-10-12 21:35 ../
-rw-r--r--  1 root root 1159418 2006-10-12 21:35 libstdc++.a
lrwxrwxrwx  1 root root      15 2006-10-12 21:35 libstdc++.la -> 
../libstdc++.la
-rw-r--r--  1 root root     950 2006-10-12 21:35 libstdc++.lai

A 'libstdc++.a' which required "cruntches" during its walk to the goal...

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-12 18:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-11  9:19 Error compiling gcc for fr30 Lars Poeschel
2006-10-12 17:28 ` Kai Ruottu
2006-10-12 18:16   ` Kai Ruottu
2006-10-12 18:36     ` Kai Ruottu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).