public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52971] New: gcc ICE with an sh64 cross-compilation
@ 2012-04-13 10:18 dhowells at redhat dot com
  2012-05-31 21:34 ` [Bug target/52971] " olegendo at gcc dot gnu.org
  2012-06-01 13:31 ` dhowells at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: dhowells at redhat dot com @ 2012-04-13 10:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52971

             Bug #: 52971
           Summary: gcc ICE with an sh64 cross-compilation
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dhowells@redhat.com


Created attachment 27149
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27149
ICE producer

I have built a cross-compiler toolchain for sh64 that can also compile for
32-bit SH.  All the 32-bit Linux kernel SH defconfigs that I've fed it have
worked, but the primary 64-bit SH defconfig fails with a gcc SEGV/ICE on at
least one of the files.

I've distilled the C code that produced the ICE down to a few lines (see
attachment).  This is compiled with:

sh64-linux-gnu-gcc -m5-32media-nofpu -ml -Wa,-isa=shmedia -O2 -c ice.c
ice.c: In function ‘part_pack_uuid’:
ice.c:8:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla/> for instructions.

The gcc build was configured with:

AR_FOR_TARGET=/usr/bin/sh64-linux-gnu-ar \
AS_FOR_TARGET=/usr/bin/sh64-linux-gnu-as \
DLLTOOL_FOR_TARGET=/usr/bin/sh64-linux-gnu-dlltool \
LD_FOR_TARGET=/usr/bin/sh64-linux-gnu-ld \
NM_FOR_TARGET=/usr/bin/sh64-linux-gnu-nm \
OBJDUMP_FOR_TARGET=/usr/bin/sh64-linux-gnu-objdump \
RANLIB_FOR_TARGET=/usr/bin/sh64-linux-gnu-ranlib \
STRIP_FOR_TARGET=/usr/bin/sh64-linux-gnu-strip \
WINDRES_FOR_TARGET=/usr/bin/sh64-linux-gnu-windres \
WINDMC_FOR_TARGET=/usr/bin/sh64-linux-gnu-windmc \
LDFLAGS='-Wl,-z,relro ' \
../gcc-4.7.0-RC-20120302/configure --disable-dependency-tracking
--disable-silent-rules --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
--build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu
--target=sh64-linux --enable-targets=all --program-prefix=sh64-linux-gnu-
--enable-languages=c --without-headers --enable-sjlj-exceptions
--with-system-libunwind --disable-nls --disable-threads --disable-shared
--disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath
--disable-gold --disable-decimal-float --enable-checking=
--enable-gnu-unique-object --enable-linker-build-id --disable-plugin
--enable-nls --with-system-zlib
--with-bugurl=http://bugzilla.redhat.com/bugzilla/ --enable-obsolete
--with-multilib-list=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single,m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu

From gcc-4.7.0-RC-20120302.tar.bz2 downloaded from the gcc website.

The binutils used was binutils-2.22.52.0.1.tar.bz2 with the patches from the
Fedora rawhide binutils srpm applied.  This was configured thusly:

LDFLAGS='-Wl,-z,relro ' \
../binutils-2.22.52.0.1/configure --disable-dependency-tracking
--disable-silent-rules --enable-checking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --target=sh64-elf
--program-prefix=sh64-linux-gnu- --disable-shared --enable-64-bit-bfd
--enable-targets=sh64-linux,sh-elf,sh-linux,sh4-linux
--with-bugurl=http://bugzilla.redhat.com/bugzilla/

And a symlink emplaced at /usr/sh64-linux to point to the /usr/sh64-elf/
directory  so that the cross-compiler could find it.

For reference, the cross-gcc and cross-binutils are built as RPMs for Fedora
using spec files or SRPMs similar to those that can be found in
http://people.redhat.com/~dhowells/cross/


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

* [Bug target/52971] gcc ICE with an sh64 cross-compilation
  2012-04-13 10:18 [Bug c/52971] New: gcc ICE with an sh64 cross-compilation dhowells at redhat dot com
@ 2012-05-31 21:34 ` olegendo at gcc dot gnu.org
  2012-06-01 13:31 ` dhowells at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-05-31 21:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52971

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |olegendo at gcc dot gnu.org

--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-05-31 21:31:10 UTC ---
Could you please try these patches?

http://gcc.gnu.org/ml/gcc-patches/2012-03/msg00208.html
http://gcc.gnu.org/ml/gcc-patches/2012-03/msg00209.html
http://gcc.gnu.org/ml/gcc-patches/2012-03/msg00210.html


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

* [Bug target/52971] gcc ICE with an sh64 cross-compilation
  2012-04-13 10:18 [Bug c/52971] New: gcc ICE with an sh64 cross-compilation dhowells at redhat dot com
  2012-05-31 21:34 ` [Bug target/52971] " olegendo at gcc dot gnu.org
@ 2012-06-01 13:31 ` dhowells at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: dhowells at redhat dot com @ 2012-06-01 13:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52971

dhowells@redhat.com <dhowells at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from dhowells at redhat dot com <dhowells at redhat dot com> 2012-06-01 13:31:06 UTC ---
Those fix it for me.


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

end of thread, other threads:[~2012-06-01 13:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 10:18 [Bug c/52971] New: gcc ICE with an sh64 cross-compilation dhowells at redhat dot com
2012-05-31 21:34 ` [Bug target/52971] " olegendo at gcc dot gnu.org
2012-06-01 13:31 ` dhowells at redhat dot com

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).