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



+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.


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).

Paolo


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