4.2.2 bootstrap fails on sparc-sun-solaris2.8

Dennis Clarke dclarke@blastwave.org
Sat Oct 13 06:05:00 GMT 2007


> Dennis Clarke wrote:
>
>>   http://www.blastwave.org/dclarke/gcc-4.2.2/gcc-4.2.2-bootstrap-failure.log
>>
>>   Was there some sort of a significant change between GCC 4.2.1 and GCC
>> 4.2.2 which means that the exact same machine and software environment
>> would build GCC 4.2.1 but fail with GCC 4.2.2 ?
>>
>>   Or am I missing something obvious ?
>
> The reason for the failure is that somehow the CFLAGS for the bootstrap
> Sun compiler are getting passed to the just-built xgcc during building
> of libgcc.

That is so very strange. I have never seen that before.

> I suspect an environmental problem.  Do you have
> CFLAGS_FOR_TARGET set by any chance?

 No Sir I do not.

> From gcc/Makefile.in:
>
> LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS)
> $(TARGET_LIBGCC2_CFLAGS) \
>                  $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \
>                  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
>                  $(INHIBIT_LIBC_CFLAGS)
>
> ...where GCC_CFLAGS is:
>
> GCC_CFLAGS=$(CFLAGS_FOR_TARGET) $(INTERNAL_CFLAGS) $(X_CFLAGS)
> $(T_CFLAGS) $(LOOSE_WARN) -Wold-style-definition $($@-warn) -isystem
> ./include $(TCFLAGS)
>
> ...and:
>
> INTERNAL_CFLAGS = -DIN_GCC @CROSS@
>
> The actual expansion of all this is:
>
> /opt/build/gcc-4.2.2-build/./gcc/xgcc
> -B/opt/build/gcc-4.2.2-build/./gcc/
> -B/export/home/dclarke/local/sparc-sun-solaris2.8/bin/
> -B/export/home/dclarke/local/sparc-sun-solaris2.8/lib/ -isystem
> /export/home/dclarke/local/sparc-sun-solaris2.8/include -isystem
> /export/home/dclarke/local/sparc-sun-solaris2.8/sys-include -O2  -O2
> -xstrconst -xildoff -xarch=v7 -xcode=pic32 -xlibmieee -xlibmil -Xa
> -xregs=no%appl

  Those look like options for Sun Studio 8 there !

> -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC
> -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I.
> -I/opt/build/gcc-4.2.2/gcc -I/opt/build/gcc-4.2.2/gcc/.
> -I/opt/build/gcc-4.2.2/gcc/../include
> -I/opt/build/gcc-4.2.2/gcc/../libcpp/include
> -I/export/home/dclarke/local/include
> -I/export/home/dclarke/local/include
> -I/opt/build/gcc-4.2.2/gcc/../libdecnumber -I../libdecnumber -DL_muldi3
> -c /opt/build/gcc-4.2.2/gcc/libgcc2.c -o libgcc/./_muldi3.o
>
> Therefore it looks like somehow CFLAGS_FOR_TARGET="-O2 -xstrconst
> -xildoff -xarch=v7 -xcode=pic32 -xlibmieee -xlibmil -Xa -xregs=no%appl"

Well I don't have that environment variable set. In fact, I have very few
and I ensure that my environment is quite spartan and standardized before
any GCC build attempt.

> which if true is certainly bogus, because CFLAGS_FOR_TARGET should not
> contain flags for the bootstrap compiler, as it's what the newly-built
> gcc uses when building target libraries, and those are not gcc options.
> Check your environment for stray values.

Checked ... and there are no such vars in place.

I am testing with GCC 4.2.2 on other Solaris machines I have here and thus
far .. all fail.

I'll go back to GCC 4.2.1 and test .. if *that* bootstraps fine then .. well
gee I don't know what that means yet.  :-(

Dennis Clarke



More information about the Gcc-help mailing list