[OpenIndiana-discuss] How to fix gcc for OI SPARC

Gary Mills gary_mills at fastmail.fm
Sat Jan 21 16:15:10 UTC 2017


I've been building components from the oi-userland consolidation on my
SPARC machine.  All of the gcc48, gcc49, and gcc-5 builds fail with
this error message:

    Comparing stages 2 and 3
    warning: gcc/cc1plus-checksum.o differs
    warning: gcc/cc1obj-checksum.o differs
    warning: gcc/cc1-checksum.o differs
    Bootstrap comparison failure!

The comparison error has reappeared at least twice in gcc builds.  I
presume it no longer affects builds on the x86 platform.  Likely, only
builds on SPARC hardware are affected now.

I have two patches that claim to fix this bug.  The simplest is Olaf
Bohlen's patch, which changes only bootstrap-debug.mk by commenting
out this line:

    STAGE2_CFLAGS += -gtoggle

Does this patch only bypass the comparison?  What does it do for x86
builds?  I need a fix that works correctly for both x86 and SPARC.

The other patch is from Eric Botcazou, available here:

    https://patchwork.ozlabs.org/patch/637446/

It sounds good, modifying only reload1.c:

    This fixes a bootstrap comparison failure on SPARC/Linux introduced by
    the reload change made for PR target/60040, which added calls to
    finish_spills without previously calling select_reload_regs.  This
    left finish_spills work on uninitialized data, hence the comparison
    failure.

Unfortunately, it does not apply cleanly on any of the three gcc
components, using gcc-4.8.5, gcc-4.9.4, and gcc-5.4.0 .  I hesitate to
try this patch.

The build only fails after running for 12 to 20 hours.  I'd like to
fix it only once for each component.  That's why I'm asking people
who might know gcc better than I do for their recommendation.


-- 
-Gary Mills-		-refurb-		-Winnipeg, Manitoba, Canada-



More information about the openindiana-discuss mailing list