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: [RFA] PR13946 [1/3] toplevel configure/makefile objc/boehm-gc


Paolo Bonzini schrieb:
> 
>> +AC_ARG_ENABLE(objc-gc,
>> +[  --enable-objc-gc       enable the use of Boehm's garbage collector
>> with
>> +                          the GNU Objective-C runtime.],
>> +[case $enable_objc_gc in
>> +  yes)
>> +    # reenable boehm-gc if it is needed for objc
>> +    noconfigdirs=`echo " ${noconfigdirs} " | sed -e
>> 's/target-boehm-gc //'`
>> +    libgcj=`echo " ${libgcj} " | sed -e 's/target-boehm-gc //'`
>> +    libgcj_saved=`echo " ${libgcj_saved} " | sed -e
>> 's/target-boehm-gc //'`
> 
> 
> I don't see libgcj_saved being read elsewhere in configure.in.  You
> could delete it instead of writing it here.

Hello Paolo,

it used in:
./gcc/java/config-lang.in:
target_libs=${libgcj_saved}

> An alternative possibility is this:
> - get rid of boehm-gc within the libgcj variable.
> - readd boehm-gc to every noconfigdirs="$noconfigdirs ${libgcj}" line of
> configure.in; later we can refine this to include only those systems
> where boehm-gc is not working.
> - put the AC_ARG_ENABLE after the last such line of configure.in, and
> raise an error there if noconfigdirs includes boehm-gc
> - add another "if", after the AC_ARG_ENABLE, that prevents boehm-gc from
> building if enable_objc_gc is not specified and target_configdirs does
> not include libgcj.
> 
> Actually, the last step is not necessary as, in the worst case, it will
> cause an unnecessary build of boehm-gc.  If people do not like this (as
> I think), I guess your patch is good enough with the libgcj_saved change
> (but I cannot approve it).

I must admit, I have a hard time wrapping my head around this
'noconfigdir' logic in light of target libraries that are useful for
multiple other target libraries.

We have a similar situation with libffi, (which we should also be using
in Objective-C instead of builtin_apply to implement forwarding for
configurations which are supported by libffi.  Once this is figured out,
we can move forward on removing the usage of tm.h in libobjc).

IIUC, wouldn't re-adding 'target-boehm-gc' to every
noconfigdirs="$noconfigdirs ${libgcj}" line break building
libgcj by force via enable_libgcj?  OTOH, I can't seem to figure out how
enable_libgcj should currently be set, so this may be dead code anyway.

Cheers,
David


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