Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 290891 - [4.4/ICE/MIPS] sys-devel/gcc-4.4.2 SYSCALLS.c:1: internal compiler error: Segmentation fault
Summary: [4.4/ICE/MIPS] sys-devel/gcc-4.4.2 SYSCALLS.c:1: internal compiler error: Seg...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: MIPS Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://stuartl.longlandclan.yi.org/bl...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-28 15:12 UTC by Mike Hammill
Modified: 2011-07-09 16:45 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gcc-4.4.2 build log with segfault (gcc_442.log,511.07 KB, text/plain)
2009-10-28 15:15 UTC, Mike Hammill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Hammill 2009-10-28 15:12:24 UTC
I consistently (well, with three tries) get segfault when trying to upgrade from gcc-4.3.4 to 4.4.2 on mips.  Note: this is not cross compiling, but simple compile of gcc on a mips box itself.  Main error message:

SYSCALLS.c:1: internal compiler error: Segmentation fault

Reproducible: Always

Steps to Reproduce:
1. attempt to build gcc-4.4.2 on mips O2
2. get segfault at same place every time





Here is emerge --info.  I will separately attach one of the build logs

# emerge --info gcc
Portage 2.1.7.1 (default/linux/mips/10.0/server, gcc-4.3.4, glibc-2.9_p20081201-r3, 2.6.29.1-mipsgit-20090324 mips64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-2.6.29.1-mipsgit-20090324-mips64-R5000_V2.1_FPU_V1.0-with-gentoo-2.0.1
Timestamp of tree: Wed, 28 Oct 2009 00:20:01 +0000
distcc 3.1 mips-unknown-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p35
dev-lang/python:     2.6.3, 3.1.1-r1
dev-util/ccache:     2.4-r8
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.2-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.10.2, 1.11
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="mips ~mips"
CBUILD="mips-unknown-linux-gnu"
CFLAGS="-O2 -march=mips4 -pipe -mabi=32"
CHOST="mips-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=mips4 -pipe -mabi=32"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.ing.umu.se/linux/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.ds.karen.hj.se/gentoo/ http://trumpetti.atm.tut.fi/gentoo/"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,--hash-style=sysv"
LINGUAS="en_US en_GB sv_SE sv"
MAKEOPTS="-j2"
PKGDIR="/var/pkg"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://giddy.michael.hammill.name/gentoo-portage"
USE="bash-completion berkdb bzip2 cli cracklib crypt cups fam fortran gdbm gpm iconv ipv6 isdnlog mailwrapper mips modules mudflap ncurses nls no-old-linux nptl nptlonly openmp pam pcre perl pppd python python3 readline reflection session snmp spl ssl sysfs tcpd truetype unicode vram xml xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en_GB sv_SE sv" USERLAND="GNU" VIDEO_CARDS="fbdev impact newport" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-devel/gcc-4.3.4 was built with the following:
USE="fortran mudflap nls nptl openmp (-altivec) -bootstrap -build -doc -fixed-point -gcj -gtk (-hardened) -ip28 -ip32r10k (-libffi) (-multilib) -multislot -n32 -n64 -nocxx -nopie -objc -objc++ -objc-gc -test -vanilla" 
CFLAGS="-O2 -march=mips4 -pipe"
CXXFLAGS="-O2 -march=mips4 -pipe"
Comment 1 Mike Hammill 2009-10-28 15:15:38 UTC
Created attachment 208527 [details]
gcc-4.4.2 build log with segfault
Comment 2 Mathieu Z 2009-10-31 01:23:53 UTC
Also same error on ~amd64/nomultilib with gcc-4.4.1

$ emerge --info
Portage 2.1.7.1 (default/linux/amd64/10.0/no-multilib, gcc-4.4.1, glibc-2.10.1-r0, 2.6.31-gentoo x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_330_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 30 Oct 2009 10:30:01 +0000
app-shells/bash:     4.0_p35
dev-lang/python:     2.6.3, 3.1.1-r1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.2-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=""
FEATURES="assume-digests distlocks fixpackages metadata-transfer news parallel-fetch parallel_fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -Wl,--as-needed"
LINGUAS="en zh zh_TW zh_CN ja"
MAKEOPTS="-j4 -l"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/gentoo-china /usr/local/portage/layman/gentoo-taiwan /usr/local/portage/layman/sunrise /usr/local/portage/overylay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi aim alsa amd64 apache2 audiofile avahi bash-completion berkdb bidi bluetooth bzip2 cairo caps cdaudio cddb cdparanoia cdr cjk cli cracklib crypt cscope css cups curl curlwrappers cvs cxx dbus dga directfb djvu dri dts dv dvd dvdr dvdread encode enscript exif expat fam fastcgi fbcon ffmpeg firefox flac flash fontconfig foomaticdb fortran ftp fuse gd gdbm git glib glut gnome gnome-keyring gnutls gphoto2 gpm gps graphviz gs gstreamer gtk hal httpd iconv icq icu idn ieee1394 imagemagick imap imlib innodb ipod ipv6 isdnlog jabber javascript jingle joystick jpeg jpeg2k kpathsea lame latex lcms libcaca libnotify libsamplerate lm_sensors lzo m17n-lib mad matroska mercurial mmx mmxext modules mp3 mp4 mpeg mplayer msn mudflap musepack musicbrainz mysql mysqli ncurses netboot nforce2 nis nls nntp nptl nptlonly nsplugin odbc ogg openal opengl openmp osc oscar pae pam pch pcre pda pdf perl php plotutils png posix postgres ppds pppd pulseaudio python python3 qq quicktime raw readline recode reflection rss ruby samba scanner session simplexml slang sndfile sockets socks5 speex spell spl sqlite sqlite3 sse sse2 sse2i sse3 ssl subversion svg sysfs taglib tcpd theora threads tidy tiff timidity truetype unicode upnp usb v4l2 vcd vhosts vim-syntax vorbis wav wavepack wma wmf wmp x264 x86emu xcb xcomposite xforms xft xine xinerama xml xorg xosd xsl xulrunner xv xvid yahoo zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache charset_lite dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev wacom" KERNEL="linux" LINGUAS="en zh zh_TW zh_CN ja" USERLAND="GNU" VIDEO_CARDS="intel vesa fbdev" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 3 Mathieu Z 2009-10-31 01:56:18 UTC
Terribly sorry. Wrong bug. Misread the log file. I filed my bug somewhere else (#291246).
Comment 4 Todd 2010-01-01 16:12:36 UTC
(In reply to comment #0)
> I consistently (well, with three tries) get segfault when trying to upgrade
> from gcc-4.3.4 to 4.4.2 on mips.  Note: this is not cross compiling, but simple
> compile of gcc on a mips box itself.  Main error message:
> 
> SYSCALLS.c:1: internal compiler error: Segmentation fault
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. attempt to build gcc-4.4.2 on mips O2
> 2. get segfault at same place every time
> 
> 
> 
> 
> 
> Here is emerge --info.  I will separately attach one of the build logs
> 
> # emerge --info gcc
> Portage 2.1.7.1 (default/linux/mips/10.0/server, gcc-4.3.4,
> glibc-2.9_p20081201-r3, 2.6.29.1-mipsgit-20090324 mips64)
> =================================================================
>                          System Settings
> =================================================================
> System uname:
> Linux-2.6.29.1-mipsgit-20090324-mips64-R5000_V2.1_FPU_V1.0-with-gentoo-2.0.1
> Timestamp of tree: Wed, 28 Oct 2009 00:20:01 +0000
> distcc 3.1 mips-unknown-linux-gnu [disabled]
> ccache version 2.4 [enabled]
> app-shells/bash:     4.0_p35
> dev-lang/python:     2.6.3, 3.1.1-r1
> dev-util/ccache:     2.4-r8
> sys-apps/baselayout: 2.0.1
> sys-apps/openrc:     0.5.2-r1
> sys-apps/sandbox:    2.2
> sys-devel/autoconf:  2.63-r1
> sys-devel/automake:  1.10.2, 1.11
> sys-devel/binutils:  2.20
> sys-devel/gcc-config: 1.4.1
> sys-devel/libtool:   2.2.6a
> virtual/os-headers:  2.6.27-r2
> ACCEPT_KEYWORDS="mips ~mips"
> CBUILD="mips-unknown-linux-gnu"
> CFLAGS="-O2 -march=mips4 -pipe -mabi=32"
> CHOST="mips-unknown-linux-gnu"
> CONFIG_PROTECT="/etc"
> CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf
> /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo
> /etc/udev/rules.d"
> CXXFLAGS="-O2 -march=mips4 -pipe -mabi=32"
> DISTDIR="/usr/portage/distfiles"
> FEATURES="assume-digests buildpkg ccache distlocks fixpackages news
> parallel-fetch protect-owned sandbox sfperms strict unmerge-logs
> unmerge-orphans userfetch"
> GENTOO_MIRRORS="http://ftp.ing.umu.se/linux/gentoo/
> http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.ds.karen.hj.se/gentoo/
> http://trumpetti.atm.tut.fi/gentoo/"
> LC_ALL="en_US.utf8"
> LDFLAGS="-Wl,--hash-style=sysv"
> LINGUAS="en_US en_GB sv_SE sv"
> MAKEOPTS="-j2"
> PKGDIR="/var/pkg"
> PORTAGE_CONFIGROOT="/"
> PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
> --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles
> --exclude=/local --exclude=/packages"
> PORTAGE_TMPDIR="/var/tmp"
> PORTDIR="/usr/portage"
> PORTDIR_OVERLAY="/usr/local/portage"
> SYNC="rsync://giddy.michael.hammill.name/gentoo-portage"
> USE="bash-completion berkdb bzip2 cli cracklib crypt cups fam fortran gdbm gpm
> iconv ipv6 isdnlog mailwrapper mips modules mudflap ncurses nls no-old-linux
> nptl nptlonly openmp pam pcre perl pppd python python3 readline reflection
> session snmp spl ssl sysfs tcpd truetype unicode vram xml xorg zlib"
> ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
> hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug
> rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic
> authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm
> authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache
> dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache
> filter headers include info log_config logio mem_cache mime mime_magic
> negotiation rewrite setenvif speling status unique_id userdir usertrack
> vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux"
> LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses
> text" LINGUAS="en_US en_GB sv_SE sv" USERLAND="GNU" VIDEO_CARDS="fbdev impact
> newport" 
> Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG,
> PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
> 
> =================================================================
>                         Package Settings
> =================================================================
> 
> sys-devel/gcc-4.3.4 was built with the following:
> USE="fortran mudflap nls nptl openmp (-altivec) -bootstrap -build -doc
> -fixed-point -gcj -gtk (-hardened) -ip28 -ip32r10k (-libffi) (-multilib)
> -multislot -n32 -n64 -nocxx -nopie -objc -objc++ -objc-gc -test -vanilla" 
> CFLAGS="-O2 -march=mips4 -pipe"
> CXXFLAGS="-O2 -march=mips4 -pipe"
> 

I am having the same error on a ~x86 system
Comment 5 Manuel Lauss 2010-02-10 11:58:08 UTC
I got past this by using distcc and 4.4.2/4.4.3 on the distcc helpers (4.3.4 on the helpers results in the same ICE).  The build is still running though...
Comment 6 Stuart Longland (RETIRED) gentoo-dev 2010-02-21 20:41:17 UTC
I can confirm this bug with gcc-4.4.3 as well.

rm -f include-fixed/README                                                                                                  
cp /tmp/portage/sys-devel/gcc-4.4.3/work/gcc-4.4.3/gcc/../fixincludes/README-fixinc include-fixed/README                    
chmod a+r include-fixed/README                                                                                              
echo timestamp > stmp-int-hdrs                                                                                              
rm -f SYSCALLS.c tmp-SYSCALLS.s                                                                                             
sed -e s/TARGET_GETGROUPS_T/gid_t/ \                                                                                        
          /tmp/portage/sys-devel/gcc-4.4.3/work/gcc-4.4.3/gcc/sys-types.h /tmp/portage/sys-devel/gcc-4.4.3/work/gcc-4.4.3/gcc/sys-protos.h > SYSCALLS.c                                                                                                 
/tmp/portage/sys-devel/gcc-4.4.3/work/build/./gcc/xgcc -B/tmp/portage/sys-devel/gcc-4.4.3/work/build/./gcc/ -B/usr/mipsel-unknown-linux-gnu/bin/ -B/usr/mipsel-unknown-linux-gnu/lib/ -isystem /usr/mipsel-unknown-linux-gnu/include -isystem /usr/mipsel-unknown-linux-gnu/sys-include -O2 -pipe -mips3 -g -minterlink-mips16 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wno-strict-prototypes -Wno-error -isystem ./include  -I. -I. -I/tmp/portage/sys-devel/gcc-4.4.3/work/gcc-4.4.3/gcc -I/tmp/portage/sys-devel/gcc-4.4.3/work/gcc-4.4.3/gcc/. -I/tmp/portage/sys-devel/gcc-4.4.3/work/gcc-4.4.3/gcc/../include -I/tmp/portage/sys-devel/gcc-4.4.3/work/gcc-4.4.3/gcc/../libcpp/include  -I/tmp/portage/sys-devel/gcc-4.4.3/work/gcc-4.4.3/gcc/../libdecnumber -I/tmp/portage/sys-devel/gcc-4.4.3/work/gcc-4.4.3/gcc/../libdecnumber/dpd -I../libdecnumber    \                                                                                     
          -aux-info SYSCALLS.c.X -S -o tmp-SYSCALLS.s SYSCALLS.c                                                            
SYSCALLS.c:1: internal compiler error: Segmentation fault                                                                   
Please submit a full bug report,                                                                                            
with preprocessed source if appropriate.                                                                                    
See <http://bugs.gentoo.org/> for instructions.                                                                             
make[3]: *** [SYSCALLS.c.X] Error 1                                                                                         
make[3]: Leaving directory `/tmp/portage/sys-devel/gcc-4.4.3/work/build/gcc'                                                
make[2]: *** [all-stage1-gcc] Error 2                                                                                       
make[2]: Leaving directory `/tmp/portage/sys-devel/gcc-4.4.3/work/build'                                                    
make[1]: *** [stage1-bubble] Error 2                                                                                        
make[1]: Leaving directory `/tmp/portage/sys-devel/gcc-4.4.3/work/build'                                                    
make: *** [bootstrap-lean] Error 2                                                                                          
 * ERROR: sys-devel/gcc-4.4.3 failed:                                                                                       
 *   emake failed with bootstrap-lean                                                                                       

In the interests of comparison... (hmmm, and I notice I haven't switched profiles yet.  Cobalt and Lemote profiles are almost identical however.) 

sh-4.0# emerge --info
Portage 2.1.7.17 (default/linux/mips/10.0/cobalt/developer, gcc-4.3.4, glibc-2.9_p20090420-r0, 2.6.30-rc4-lm2f-nb mips64)
=================================================================                                                        
System uname: Linux-2.6.30-rc4-lm2f-nb-mips64-ICT_Loongson-2_V0.3_FPU_V0.1-with-gentoo-2.0.1                             
Timestamp of tree: Sat, 20 Feb 2010 13:45:03 +0000                                                                       
distcc 3.1 mipsel-unknown-linux-gnu [disabled]                                                                           
ccache version 2.4 [enabled]                                                                                             
app-shells/bash:     4.0_p28                                                                                             
dev-java/java-config: 2.1.8-r1                                                                                           
dev-lang/python:     2.5.4-r3, 2.6.2-r1, 3.1.1                                                                           
dev-util/ccache:     2.4-r8                                                                                              
dev-util/cmake:      2.6.4-r2                                                                                            
sys-apps/baselayout: 2.0.1                                                                                               
sys-apps/openrc:     0.4.3-r3                                                                                            
sys-apps/sandbox:    2.0                                                                                                 
sys-devel/autoconf:  2.13, 2.63-r1                                                                                       
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11                                             
sys-devel/binutils:  2.19.1-r50, 2.19.51.0.14-r1, 2.20                                                                   
sys-devel/gcc:       4.1.2, 4.3.3-r1, 4.3.4                                                                              
sys-devel/gcc-config: 1.4.1                                                                                              
sys-devel/libtool:   2.2.6a                                                                                              
virtual/os-headers:  2.6.30-r1                                                                                           
ACCEPT_KEYWORDS="mips ~mips"                                                                                             
ACCEPT_LICENSE="* -@EULA"                                                                                                
CBUILD="mipsel-unknown-linux-gnu"                                                                                        
CFLAGS="-O2 -mabi=32 -pipe -mips3 -g"                                                                                    
CHOST="mipsel-unknown-linux-gnu"                                                                                         
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb" 
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"                                                     
CXXFLAGS="-O2 -mabi=32 -pipe -mips3 -g"                                                                                     
DISTDIR="/home/portage/distfiles"                                                                                           
FEATURES="assume-digests buildpkg ccache collision-protect cvs digest distlocks fixpackages multilib-strict news nostrip parallel-fetch protect-owned sfperms sign splitdebug strict stricter test test-fail-continue unmerge-logs unmerge-orphans userfetch userpriv usersandbox"                                                                                                  
GENTOO_MIRRORS="                http://www.longlandclan.yi.org/portage          http://qube.redhatters.yi.org/pub/gentoo/archive            http://qube.redhatters.yi.org/pub/gentoo                http://taijia.redhatters.yi.org/                http://zhenghe.redhatters.yi.org/gentoo/            http://moosehead.redhatters.yi.org/             http://fullhouse.redhatters.yi.org/                 http://mirror.aarnet.edu.au/pub/gentoo                  http://mirror.isp.net.au/ftp/pub/gentoo/   http://ftp.swin.edu.au/gentoo/"                                                                                              
LDFLAGS="-Wl,-O1"                                                                                                           
LINGUAS="en_GB en_AU en"                                                                                                    
PKGDIR="/home/portage/packages/mipsel/mips3"                                                                                
PORTAGE_CONFIGROOT="/"                                                                                                      
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                          
PORTAGE_TMPDIR="/tmp"                                                                                                       
PORTDIR="/usr/portage"                                                                                                      
PORTDIR_OVERLAY="/home/portage/overlays/local /home/portage/overlays/shared /home/portage/overlays/gentoo-cn /home/portage/layman/mozilla /home/portage/layman/java-overlay /home/portage/layman/gentoo-china"                                          
SYNC="rsync://192.168.5.1/gentoo-portage"                                                                                   
USE="X Xaw3d a52 aac aalib accessibility ads aiglx aio akode alisp alsa amrnb amrwb ao aotuv apache2 apm arts audiofile autoipd avahi bash-completion bcmath berkdb bidi bitmap-fonts bl bluetooth bonobo bookmarks boost bzip2 cairo calendar capi ccache cdparanoia cgi chardet chm cjk cle266 cli clucene cluster consolekit coverage cracklib crypt ctype cups curl cviewer cvs cxx daap dbase dbus debug decibel dedicated demo device-mapper dia disk-partition divx djvu dns doc dtmf dts dvb dvd dvdread encode etcproposals examples exif exiv2 fam fame fax fbcon ffmpeg fftw filepicker filter firefox fits flac flatfile font-server fontconfig fortran fpx ftdi ftp gcj gd gdbm gif gimp gimpprint gitsendemail gjdoc glib gmedia gmp gnutls gpm gps graphviz gs gtk gtk2 gtk2-perl h224 h281 hal hash howl-compat http-server hyperestraier iax iconv id3tag idn imagemagick imap imlib inifile inkjar inotify ipod iproute2 ipv6 ivr ixj jabber jadetex java6 javascript jbig jingle jpeg json kde kig-scripting kontact ksolver lcms ldap libcaca libclamav libffi lid log lzma lzo mbrola md5sum mdnsresponder-compat mikmod mips mjpeg mmap mng mnt modplug modules mozbranding mozsha1 mp3 mp3rtp mp3tunes mp4 mplayer mssql mtp mudflap multislot multiuser musepack mysql nas ncurses netpbm network network_manager networkmanager newxkb nis njb nls nptl nptlonly nsplugin ntp oav odbc ogg opengl openmp oss pam pango parport passwordsave pch pcntl pcre pdf pdflib perl pipechan plotutils plugin png pnm policykit postscript povray ppds pppd python qmax qt qt3 qt3support qt4 quicktime raw rdesktop readline realmedia reflection replytolist restrict-javascript rfc4175 rogue rplay samba samba4 sametime sbc sdl server session sharedext sid simplexml sipim slp smp sms sndfile snmp soap sockets softmmu speex spell spl sqlite sqlite3 srtp ssl startup-notification stats stroke subversion suhosin svg swig symlink sysfs sysvipc taglib tcl tcltk tcpd teletext tetex theora threads thunar tidy tiff tk tokenizer tpctl truetype truetype-fonts type1-fonts unicode usb userlocales userpriv utf8 v4l v4l2 vcd vdpau vidix vim-syntax visualization vnc vorbis vorbis-psy vpb vxml wav wavpack wddx webdav webkit winbind wma wmf wmp wpg wxgtk1 xanim xatrix xattr xcb xcomposite xerces-c xforms xine xinetd xml xmlreader xmlrpc xmlwriter xmms xorg xpm xprint xscreensaver xsl xulrunner xv xvid xvmc yaz zeroconf zip zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en_AU en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="siliconmotion"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

It may be worth trying 4.4.1 at some point ... as I recall being able to compile that as a cross-compiler (kgcc64)... but my recollections could be foggy too because it was a while ago.  In short though, I can verify the bug on my Lemote Yeeloong.
Comment 7 Manuel Lauss 2010-02-24 06:34:32 UTC
After a bit of trying I was able to build gcc-4.4.3 natively:
- use distcc, with 4.4.3 cross-compiler on the helpers. 4.3.4 as base 
  either native or the distcc helpers always results in the reported
  segfault.
- build a C-only compiler first (USE="nocxx") with distcc
- rebuild it without nocxx flag natively.

Portage 2.1.7.17 (default/linux/mips/10.0, gcc-4.4.3, glibc-2.10.1-r1, 2.6.32-exm1200 mips)
=================================================================
System uname: Linux-2.6.32-exm1200-mips-Au1250_V0.2-with-gentoo-2.0.1
Timestamp of tree: Mon, 22 Feb 2010 06:45:02 +0000
distcc 3.1 mipsel-softfloat-linux-gnu [enabled]
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p2
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-python/pycrypto: 2.1.0
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.0-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.51.0.6
sys-devel/gcc:       4.3.4, 4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="mips x86 ~mips ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="mipsel-softfloat-linux-gnu"
CFLAGS="-O2 -mips32 -mllsc -msoft-float --param max-aliased-vops=10000 -pipe"
CHOST="mipsel-softfloat-linux-gnu"
CXXFLAGS="-O2 -mips32 -mllsc -msoft-float --param max-aliased-vops=10000"

# gcc -v
Using built-in specs.
Target: mipsel-softfloat-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.4.3/work/gcc-4.4.3/configure --prefix=/usr --bindir=/usr/mipsel-softfloat-linux-gnu/gcc-bin/4.4.3 --includedir=/usr/lib/gcc/mipsel-softfloat-linux-gnu/4.4.3/include --datadir=/usr/share/gcc-data/mipsel-softfloat-linux-gnu/4.4.3 --mandir=/usr/share/gcc-data/mipsel-softfloat-linux-gnu/4.4.3/man --infodir=/usr/share/gcc-data/mipsel-softfloat-linux-gnu/4.4.3/info --with-gxx-include-dir=/usr/lib/gcc/mipsel-softfloat-linux-gnu/4.4.3/include/g++-v4 --host=mipsel-softfloat-linux-gnu --build=mipsel-softfloat-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --with-float=soft --disable-nls --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-multilib --disable-libmudflap --disable-libssp --disable-libgomp --enable-cld --with-python-dir=/share/gcc-data/mipsel-softfloat-linux-gnu/4.4.3/python --disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.3 p1.0' --with-mips-plt
Thread model: posix
gcc version 4.4.3 (Gentoo 4.4.3 p1.0)
Comment 8 Stuart Longland (RETIRED) gentoo-dev 2010-04-19 12:30:31 UTC
Hmmm, unfortunately distcc is not an option for me at present... as these days I only have two reliable machines to work with... one is the Windows XP-based laptop I'm using now... the other is the Yeeloong that has the problem.

The other MIPS machines could work ... but I need to update the userland on them, where I run into this problem also.  Any x86 machines I have these days either are unbootable, run incompatible operating systems, or are slower than the MIPS machines.

Toolchain herd: Any ideas where we could start looking for this gem?  I'm afraid this bug is a complete blocker to me building newer stages.
Comment 9 Stuart Longland (RETIRED) gentoo-dev 2010-07-31 11:29:08 UTC
Long time coming... but I think I've got some news...

It seems, building gcc-4.4.x natively using Gentoo's patchset causes the aforementioned ICE.  Even cross-building a C-only gcc on my desktop (which has now died... a new AMD64 system is coming soon though), the resulting gcc was not able to build a working gcc binary.

USE=vanilla emerge gcc... however, worked.  My Qube2 is slowly plodding its way through an `emerge -e system` in a chroot.  I plan to run this through Catalyst when its done... we'll then have updated stages.

As an upgrade path for existing users, I can also upload a binpkg of gcc.  If I manage to successfully build gcc without USE=vanilla, I'll update this bug.
Comment 10 Mike Hammill 2010-08-02 11:23:44 UTC
(In reply to comment #9)
Thanks, Stuart!

As an odd coincidence, I was just thinking about this problem last night.  Would it be helpful if I try to upgrade from gcc-4.3.3 to 4.4.4 using USE=vanilla on my old O2 (i.e., compiling natively) as a sort of extra test?

/Mike
Comment 11 Siarhei Siamashka 2010-09-28 07:39:46 UTC
Hi, any news about this bug? Has anybody managed to confirm which patch exactly could cause problems? Is the current gcc 4.4.4-r2 any better?

I'm trying to build mips-unknown-linux-gnu stage myself, so far not very successfully because one thing or another fails in the middle of building stage1. It could be just anything, including kernel instability. But this bug also look like a possible cause.
Comment 12 Manuel Lauss 2010-09-28 09:16:02 UTC
(In reply to comment #11)
> Hi, any news about this bug? Has anybody managed to confirm which patch exactly
> could cause problems? Is the current gcc 4.4.4-r2 any better?
> 
> I'm trying to build mips-unknown-linux-gnu stage myself, so far not very
> successfully because one thing or another fails in the middle of building
> stage1. It could be just anything, including kernel instability. But this bug
> also look like a possible cause.


I've successfully built 4.4.4-r2 both as cross and native.  The problem seems to me is that 4.3 builds a buggy 4.4.  The workaround I mentioned in comment #7 still works (for building natively and if distcc is an option for you).

I've seen build problems only with the glibc-header stage, but that can be easily worked around with supplying "--without-headers" to crossdev.
Comment 13 Siarhei Siamashka 2010-10-02 07:59:01 UTC
(In reply to comment #11)
> I'm trying to build mips-unknown-linux-gnu stage myself, so far not very
> successfully because one thing or another fails in the middle of building
> stage1. It could be just anything, including kernel instability. But this bug
> also look like a possible cause.

Just an update to this. The stability problems apparently turned out to be swap related (I had swap enabled on microsd card). After disabling swap, the unexpected random segfaults seem to have vanished. And I'm successfully using gcc 4.4.4-r2 with gentoo patches now. So looks like this particular bug does not affect me after all. Sorry for all the noise.
Comment 14 Matt Turner gentoo-dev 2011-06-08 21:19:40 UTC
Is this a bug with 4.4.5 or 4.5.2?
Comment 15 Matt Turner gentoo-dev 2011-07-09 16:45:29 UTC
Looks like this was a problem with building gcc-4.4 with gcc-4.3. If anyone can reproduce it, and we care to fix gcc-4.3, please reopen.