This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sh-elf build failure on mainline]


David Ayers schrieb:
> Joern RENNECKE schrieb:
>>
>>The attached patch alows the build to proceed past this obstacle,
>>although I don't know how patches to this files are supposed to be
>>handled, or if the build will eventually succeed.
>>Or why we need to cross-build boehm-gc for the target of a C / C++ /
>>objc cross compiler in the first place.  We didn't one or two weeks ago.
> 
> I suppose this is very likely related to my patches:
> 
> http://gcc.gnu.org/viewcvs?view=rev&revision=114435
> http://gcc.gnu.org/viewcvs?view=rev&revision=114563
> 
> I'm now trying to figure out why the cross-build doesn't seem deactivate
>  boehm-gc with this code from configure.in:
> 
> # Make sure we only build Boehm's garbage collector if required.
> case ,${enable_languages},:${enable_libgcj}:${enable_objc_gc} in
>   *,objc,*:*:yes)
>     # Keep target-boehm-gc if requested for Objective-C.
>     ;;
>   *,java,*:no:*)
>     # Remove target-boehm-gc if libgcj has been disabled explicitly.
>     noconfigdirs="$noconfigdirs target-boehm-gc"
>     ;;
>   *,java,*:*:*)
>     # Keep target-boehm-gc by default for Java.
>     ;;
>   *)
>     # Otherwise remove target-boehm-gc.
>     noconfigdirs="$noconfigdirs target-boehm-gc"
>     ;;
> esac
> 
> (I assume you didn't configure with --enable-objc-gc or java.)

I must admit, that I'm a bit confused.  After putting together a
combined tree to build a cross compiler I configured with:

../combined/configure --target=sh-elf
--prefix=/home/ayers/src/gcccross/install-sh-elf --with-newlib
--disable-gdbtk

And it logs:
...

The following languages will be built: c,c++,java,objc
*** This configuration is not supported in the following subdirectories:
     target-libmudflap target-libgomp target-libgloss target-libffi
target-zlib target-libjava target-libada gnattools target-libgfortran
    (Any other directories should still work fine.)

So it seems that java is an enabled language but without the runtime
'libgcj' target libraries: target-libffi, target-zlib, target-libjava

The fact that java is still in enable_languages is what is stopping the
above code from removing target-boehm-gc.

After I re-add target-boehm-gc to the 'libgcj' variable I get:

The following languages will be built: c,c++,java,objc
*** This configuration is not supported in the following subdirectories:
     target-libmudflap target-libgomp target-libgloss target-libffi
target-boehm-gc target-zlib target-libjava target-libada gnattools
target-libgfortran
    (Any other directories should still work fine.)

Deductions:
'libgcj' is not needed to build the 'java' front-end.
'libgcj' is merely needed to build the "java-runtime"

And here we happen to build the java front-end yet not the runtime.

Is this a useful configuration?  i.e. should try to:
a) disable the 'java' front-end for sh-elf
b) change the logic of my case statement to evaluate libgcj instead of
enabled_languages

I'm currently believe that this may effect other targets which are
building the java front-end by default.  So I'm leaning strongly towards b).

Cheers,
David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]