Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134547 - [4.1/ICE] cross-hppa2.0-unknown-linux-gnu-gcc-stage2-4.1.1 fails to build on x86_64
Summary: [4.1/ICE] cross-hppa2.0-unknown-linux-gnu-gcc-stage2-4.1.1 fails to build on ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR29114
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-27 10:10 UTC by Andrew Gaffney (RETIRED)
Modified: 2006-11-26 04:39 UTC (History)
0 users

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


Attachments
pre-processed source of file that caused ICE (ccnLZvOo.out,17.16 KB, text/plain)
2006-05-27 10:10 UTC, Andrew Gaffney (RETIRED)
Details
pre-processed source of 2nd file that caused ICE (ccBXQGqu.out,212.25 KB, text/plain)
2006-05-27 10:41 UTC, Andrew Gaffney (RETIRED)
Details
preprocessed source while compiling glibc for crossdev (ccfdLYJ0.out,42.27 KB, application/octet-stream)
2006-05-30 17:20 UTC, Brett Johnson
Details
reduced testcase (seed48_r.i,58 bytes, text/plain)
2006-09-16 22:08 UTC, SpanKY
Details
upstream patch to 4.1 branch (gcc-4.1.1-64bit-ice.patch,491 bytes, patch)
2006-11-25 18:21 UTC, Andrew Gaffney (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gaffney (RETIRED) gentoo-dev 2006-05-27 10:10:10 UTC
I'm trying to generate a gcc-4.1.1 cross-toolchain for hppa2.0 on my amd64. I can build a gcc-3.4.5-r1 cross-toolchain without problems. The cross-gcc-stage1-4.1.1 completes just fine. The error I get when building cross-gcc-stage2-4.1.1 is:

/var/tmp/cross/hppa2.0-unknown-linux-gnu/portage/gcc-4.1.1/work/gcc-4.1.1/libstdc++-v3/libsupc++/eh_throw.cc: In function 'void __cxxabiv1::__cxa_throw(void*, std::type_info*, void (*)(void*))':
/var/tmp/cross/hppa2.0-unknown-linux-gnu/portage/gcc-4.1.1/work/gcc-4.1.1/libstdc++-v3/libsupc++/eh_throw.cc:78: error: unrecognizable insn:
(insn 38 37 39 0 (set (reg:DI 115)
        (plus:DI (reg:DI 116)
            (const_int -5376 [0xffffffffffffeb00]))) -1 (nil)
    (expr_list:REG_EQUAL (const_int 5138137972254386944 [0x474e5543432b2b00])
        (nil)))
/var/tmp/cross/hppa2.0-unknown-linux-gnu/portage/gcc-4.1.1/work/gcc-4.1.1/libstdc++-v3/libsupc++/eh_throw.cc:78: internal compiler error: in extract_insn, at recog.c:2084

The pre-processed source of the file it was trying to compile it attached.
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2006-05-27 10:10:51 UTC
Created attachment 87671 [details]
pre-processed source of file that caused ICE
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2006-05-27 10:40:16 UTC
I just managed to get a similar ICE when using the C-only 4.1.1 cross-toolchain via distcc:

hppa2.0-unknown-linux-gnu-gcc -O2 -pipe -march=2.0 -mschedule=8000 -fomit-frame-pointer -I./../include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DCONFIG_ROOT_CHECK_OFF=0   -DCOMMON_3264 -DELF_MACHINE_H='"elf_hppa64.h"' -DARCH_hppa64 -DONLY_64  -c -o depmod_64.o depmod.c
depmod.c: In function 'addksyms':
depmod.c:1136: warning: assignment makes integer from pointer without a cast
depmod.c: In function 'extract_version':
depmod.c:541: error: unrecognizable insn:
(insn 17 16 18 1 (set (reg:DI 107)
        (plus:DI (reg:DI 108)
            (const_int -5019 [0xffffffffffffec65]))) -1 (nil)
    (expr_list:REG_EQUAL (const_int 6872331881584880741 [0x5f5f6d6f64756c65])
        (nil)))
depmod.c:541: internal compiler error: in extract_insn, at recog.c:2084
Comment 3 Andrew Gaffney (RETIRED) gentoo-dev 2006-05-27 10:41:11 UTC
Created attachment 87675 [details]
pre-processed source of 2nd file that caused ICE
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2006-05-27 10:51:06 UTC
And my 'emerge --info', because I'm sure you'll ask for it:

Portage 2.1_rc1-r4 (default-linux/amd64/2005.1, gcc-3.4.6, glibc-2.4-r3, 2.6.16-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Gentoo Base System version 1.12.0_pre19
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [disabled]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r1
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distcc distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages/amd64"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X alsa avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cdr cli crypt cups curl dlloader dri emboss encode esd flac font-server foomaticdb fortran gif gpm gtk gtk2 imlib isdnlog jpeg lzw lzw-tiff mad mikmod mp3 mpeg musicbrainz ncurses nls nptl nptlonly nsplugin offensive ogg opengl oss pam pcre pdflib perl png pppd python quicktime readline reflection sdl session smp spell spl ssl tcpd tiff timidity truetype truetype-fonts type1-fonts unicode usb userlocales vorbis wma xinerama xml xml2 xorg xpm xprint xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nv video_cards_nvidia video_cards_ati video_cards_mga video_cards_r128"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Brett Johnson 2006-05-30 17:17:38 UTC
I have encountered a similar issue trying to compile a 4.1.1 crossdev environment for my hppa1.1 system on my amd64 system. Here is the info:

hppa1.1-unknown-linux-gnu-gcc srand48_r.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -pipe      -I../include -I. -I/var/tmp/cross/hppa1.1-unknown-linux-gnu/portage/glibc-2.3.6-r4/work/build-default-hppa1.1-unknown-linux-gnu-linuxthreads/stdlib -I.. -I../libio  -I/var/tmp/cross/hppa1.1-unknown-linux-gnu/portage/glibc-2.3.6-r4/work/build-default-hppa1.1-unknown-linux-gnu-linuxthreads -I../sysdeps/hppa/elf -I../linuxthreads/sysdeps/unix/sysv/linux/hppa -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/hppa -I../libidn/sysdeps/unix -I../sysdeps/unix/sysv/linux/hppa -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/hppa/hppa1.1 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/hppa/fpu -I../sysdeps/hppa -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /usr/lib/gcc/hppa1.1-unknown-linux-gnu/4.1.1/include -isystem /usr/hppa1.1-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h       -o /var/tmp/cross/hppa1.1-unknown-linux-gnu/portage/glibc-2.3.6-r4/work/build-default-hppa1.1-unknown-linux-gnu-linuxthreads/stdlib/srand48_r.o -MD -MP -MF /var/tmp/cross/hppa1.1-unknown-linux-gnu/portage/glibc-2.3.6-r4/work/build-default-hppa1.1-unknown-linux-gnu-linuxthreads/stdlib/srand48_r.o.dt -MT /var/tmp/cross/hppa1.1-unknown-linux-gnu/portage/glibc-2.3.6-r4/work/build-default-hppa1.1-unknown-linux-gnu-linuxthreads/stdlib/srand48_r.o
srand48_r.c: In function '__srand48_r':
srand48_r.c:41: error: unrecognizable insn:
(insn 26 25 27 1 (set (reg:DI 103)
        (plus:DI (reg:DI 104)
            (const_int -6547 [0xffffffffffffe66d]))) -1 (nil)
    (expr_list:REG_EQUAL (const_int 25214903917 [0x5deece66d])
        (nil)))
srand48_r.c:41: internal compiler error: in extract_insn, at recog.c:2084
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /var/tmp/cross/hppa1.1-unknown-linux-gnu/portage/glibc-2.3.6-r4/temp/ccfdLYJ0.out file, please attach this to your bugreport.
make[2]: *** [/var/tmp/cross/hppa1.1-unknown-linux-gnu/portage/glibc-2.3.6-r4/work/build-default-hppa1.1-unknown-linux-gnu-linuxthreads/stdlib/srand48_r.o] Error 1
make[2]: Leaving directory `/var/tmp/cross/hppa1.1-unknown-linux-gnu/portage/glibc-2.3.6-r4/work/glibc-2.3.6/stdlib'
make[1]: *** [stdlib/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/cross/hppa1.1-unknown-linux-gnu/portage/glibc-2.3.6-r4/work/glibc-2.3.6'
make: *** [all] Error 2

!!! ERROR: cross-hppa1.1-unknown-linux-gnu/glibc-2.3.6-r4 failed.
Call stack:
  ebuild.sh, line 1531:   Called dyn_compile
  ebuild.sh, line 931:   Called src_compile
  glibc-2.3.6-r4.ebuild, line 1120:   Called src_compile
  glibc-2.3.6-r4.ebuild, line 1131:   Called toolchain-glibc_src_compile
  glibc-2.3.6-r4.ebuild, line 230:   Called die

!!! make for default failed
!!! If you need support, post the topmost build error, and the call stack if relevant.


And my emerge --info:Portage 2.1_rc2-r3 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-ck7 x86_64)
=================================================================
System uname: 2.6.15-ck7 x86_64 AMD Athlon(tm) 64 Processor 3400+
Gentoo Base System version 1.6.14
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US"
LC_ALL="en_US"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.blzj.lan/gentoo-portage"
USE="amd64 X alsa berkdb cli crypt dri gif gtk gtk2 isdnlog jpeg ncurses nls opengl pam pcre perl pic png pppd python readline reflection session spell spl ssl tcpd tiff truetype-fonts type1-fonts unicode xml2 xorg xv zlib elibc_glibc input_devices_evdev input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nvidia video_cards_v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 6 Brett Johnson 2006-05-30 17:20:50 UTC
Created attachment 87923 [details]
preprocessed source while compiling glibc for crossdev
Comment 7 Andrew Gaffney (RETIRED) gentoo-dev 2006-06-18 20:43:56 UTC
I've confirmed this is an amd64 problem (or at least sparc is not effected). A hppa2.0 gcc-4.1.1/glibc-2.3.6-r4 cross-toolchain just built find on my sparc64 box.
Comment 8 SpanKY gentoo-dev 2006-09-16 22:08:52 UTC
Created attachment 97200 [details]
reduced testcase

works on my ppc host, fails on my amd64/ppc64
Comment 9 Andrew Gaffney (RETIRED) gentoo-dev 2006-11-25 17:29:00 UTC
It looks like the upstream bug has been resolved. Would those patches happen to be in gcc-4.1.1-r[12]?
Comment 10 Andrew Gaffney (RETIRED) gentoo-dev 2006-11-25 18:21:12 UTC
Created attachment 102729 [details, diff]
upstream patch to 4.1 branch

This is the patch that was applied upstream to the 4.1 branch.
Comment 11 SpanKY gentoo-dev 2006-11-26 04:39:31 UTC
fixed in gcc-4.1.1-r3