Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317217 (PR42347) - =sys-devel/gcc-4.5.0 fails to build for alpha/arm/ppc due to --disable-checking
Summary: =sys-devel/gcc-4.5.0 fails to build for alpha/arm/ppc due to --disable-checking
Status: RESOLVED FIXED
Alias: PR42347
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: Alpha Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR44469
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-26 03:13 UTC by Matt Turner
Modified: 2010-07-28 23:30 UTC (History)
4 users (show)

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


Attachments
build.log.gz (build.log.gz,107.24 KB, application/octet-stream)
2010-04-26 03:14 UTC, Matt Turner
Details
use --enable-checking=release (toolchain-reinstate-checking.diff,1.02 KB, patch)
2010-07-21 17:27 UTC, Luca Barbato
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2010-04-26 03:13:28 UTC
make[2]: Entering directory `/var/tmp/portage/sys-devel/gcc-4.5.0/work/build'
make[3]: Entering directory `/var/tmp/portage/sys-devel/gcc-4.5.0/work/build'
rm -f stage_current
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.5.0/work/build'
Comparing stages 2 and 3
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/varpool.o differs
....

Let me know what I can do to help fix this.

sys-devel/gcc-4.5.0 [4.3.4, 4.4.3] USE="mudflap nptl (-altivec) -bootstrap -build -doc (-fixed-point) -fortran -gcj -graphite -gtk (-hardened) (-libffi) -lto (-multilib) -multislot (-n32) (-n64) -nls -nocxx -objc -objc++ -objc-gc -openmp -test -vanilla"

Using alpha-unknown-linux-gnu-4.4.3 to compile.
Comment 1 Matt Turner gentoo-dev 2010-04-26 03:14:52 UTC
Created attachment 229171 [details]
build.log.gz
Comment 2 SpanKY gentoo-dev 2010-04-26 05:54:57 UTC
try removing --disable-checking
Comment 3 Matt Turner gentoo-dev 2010-04-27 02:57:58 UTC
(In reply to comment #2)
> try removing --disable-checking

EXTRA_ECONF="--enable-checking" emerge =gcc-4.5.0
...works. But I can't imagine that that's an appropriate solution.
Comment 4 Siarhei Siamashka 2010-04-27 17:18:42 UTC
Welcome to the club (ppc and arm are also broken): http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42347
Comment 5 Siarhei Siamashka 2010-05-17 18:21:18 UTC
So looks like there is a fix for this problem now: http://gcc.gnu.org/viewcvs?view=revision&revision=159500

At least it should fix bootstrapping for arm/ppc/ppc64.
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2010-05-17 20:03:24 UTC
New patchset released with this in it.  Thanks
Comment 7 Matt Turner gentoo-dev 2010-05-17 22:53:47 UTC
I filed this against alpha, and it's not fixed on alpha. Reopening.

I get the same error with the new patchset.
Comment 8 Siarhei Siamashka 2010-05-17 23:47:55 UTC
Yes, I can confirm that alpha crosscompiler does not ICE on the testcase from PR42347. So it is different from what was happening on arm/ppc/ppc64.

Nevertheless __builtin_unreachable() still may be involved because it is heavily used when building gcc with --disable-checking. If you followed PR42347 gcc bugzilla entry, actually PR42347 was not the only __builtin_unreachable() related bug fixed recently. So I suggest you to also try the patch from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44071

And if it does not help, and you don't mind doing some tests yourself, checking whether reverting http://repo.or.cz/w/official-gcc.git/commit/598767c938d0d001bbbe41e0a189104bb53e3580 also helps on alpha may provide an extra bit of information.

Finally it might make a lot of sense to submit a new bug to gcc bugzilla (unless you have done that already).

Good luck.
Comment 9 Raúl Porcel (RETIRED) gentoo-dev 2010-06-20 17:50:07 UTC
Tried the patch on alpha, still fails the same way.
Comment 10 Raúl Porcel (RETIRED) gentoo-dev 2010-06-27 21:07:39 UTC
(In reply to comment #8)
> And if it does not help, and you don't mind doing some tests yourself, checking
> whether reverting
> http://repo.or.cz/w/official-gcc.git/commit/598767c938d0d001bbbe41e0a189104bb53e3580
> also helps on alpha may provide an extra bit of information.

Tried that myself, and yes, reverting that fixes it.

Comment 11 Siarhei Siamashka 2010-06-27 21:26:25 UTC
Thanks, looks like this __builtin_unreachable is quite unstable. It's a new feature of gcc 4.5 and it is probably used quite heavily only in gcc itself for --disable-checking build (causing bootstrap issues). Apparently it is not entirely perfect even on x86/amd64: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44469#c3

Could this __builtin_unreachable stuff be treated similar to other unstable gcc features like lto and graphite? I mean, could gentoo just revert this patch for now in the default gcc build configuration?
Comment 12 Raúl Porcel (RETIRED) gentoo-dev 2010-07-03 16:00:29 UTC
Mike, could we disable --disable-checking on alpha/arm, please? As always, looks like this stuff was implemented and tested on amd64/x86 only :(
Comment 13 Ryan Hill (RETIRED) gentoo-dev 2010-07-04 08:01:36 UTC
rather, upstream never tests with --disable-checking.  i wouldn't mind a debug flag that sets --enable-checking=release.
Comment 14 SpanKY gentoo-dev 2010-07-09 23:07:38 UTC
that wouldnt work across versions.  how about:
+       # For newer versions of gcc, use the default ("release"), because no
+       # one (even upstream apparently) tests with it disabled.  #317217
+       if tc_version_is_at_least 4 || [[ -n ${GCC_CHECKS_LIST} ]] ; then
+               confgcc+=" --enable-checking=${GCC_CHECKS_LIST:-release}"
+       else
+               confgcc+=" --disable-checking"
+       fi
Comment 15 Ryan Hill (RETIRED) gentoo-dev 2010-07-10 02:31:08 UTC
WFM.  And I can get rid of the hack in the svn ebuilds.
Comment 16 Luca Barbato gentoo-dev 2010-07-21 17:05:31 UTC
Why it isn't in the eclass yet? (ping if I can add it)
Comment 17 Luca Barbato gentoo-dev 2010-07-21 17:27:44 UTC
Created attachment 239695 [details, diff]
use --enable-checking=release

That can go in?
Comment 18 Mark Loeser (RETIRED) gentoo-dev 2010-07-21 19:53:15 UTC
Luca,

Go ahead.
Comment 19 Luca Barbato gentoo-dev 2010-07-21 20:20:19 UTC
Hopefully workarounded.
Comment 20 SpanKY gentoo-dev 2010-07-28 23:30:30 UTC
lets get in the habit of including commit links.

http://sources.gentoo.org/eclass/toolchain.eclass?r1=1.434&r2=1.435