re PR libobjc/32037 (--enable-objc-gc on OS X won't build)
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Fri, 15 Apr 2011 09:26:05 +0000 (09:26 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Fri, 15 Apr 2011 09:26:05 +0000 (09:26 +0000)
PR libobjc/32037
* Makefile.in (OBJC_GCFLAGS): Move ...
* configure.ac (enable_objc_gc): ... here.
Add $(libsuffix) to OBJC_BOEHM_GC.
* configure: Regenerate.

From-SVN: r172477

libobjc/ChangeLog
libobjc/Makefile.in
libobjc/configure
libobjc/configure.ac

index 485d2a4b5133d3af59ba4aa5ffb2e00be670302a..a29170442905715de11c2e99e8d45f7c71dd4419 100644 (file)
@@ -1,3 +1,11 @@
+2011-04-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libobjc/32037
+       * Makefile.in (OBJC_GCFLAGS): Move ...
+       * configure.ac (enable_objc_gc): ... here.
+       Add $(libsuffix) to OBJC_BOEHM_GC.
+       * configure: Regenerate.
+
 2011-02-28  Nicola Pero  <nicola.pero@meta-innovation.com>
        
        * selector.c (sel_getTypedSelector): Return NULL if there are
index b33c989e6d2c08dc80a6024a0791e702329092bb..e52f441d47a5ea8c37e97bda28468a66f1e01b6b 100644 (file)
@@ -93,7 +93,7 @@ LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
 LIBTOOL_CLEAN   = $(LIBTOOL) --mode=clean
 #LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
 
-OBJC_GCFLAGS=-DOBJC_WITH_GC=1
+OBJC_GCFLAGS=@OBJC_GCFLAGS@
 OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
 OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@
 OBJC_BOEHM_GC_LIBS=../boehm-gc/libgcjgc_convenience.la $(thread_libs_and_flags)
index 8f670e132e5d52bb663f5e39206a9114ae2b44a9..9c3f621c88910b927381d6e9f4f975fd960c0743 100755 (executable)
@@ -656,6 +656,7 @@ host
 multi_basedir
 OBJC_BOEHM_GC_INCLUDES
 OBJC_BOEHM_GC
+OBJC_GCFLAGS
 VERSION
 target_subdir
 host_subdir
@@ -2320,21 +2321,31 @@ $as_echo "$version_specific_libs" >&6; }
 if test "${enable_objc_gc+set}" = set; then :
   enableval=$enable_objc_gc; case $enable_objc_gc in
   no)
+    OBJC_GCFLAGS=''
     OBJC_BOEHM_GC=''
     OBJC_BOEHM_GC_INCLUDES=''
     ;;
   *)
-    OBJC_BOEHM_GC=libobjc_gc.la
+    OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
+    OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
     OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
+    case "${host}" in
+      alpha*-dec-osf*)
+        # boehm-gc headers include <pthread.h>, which needs to be compiled
+       # with -pthread on Tru64 UNIX.
+        OBJC_GCFLAGS="${OBJC_GCFLAGS} -pthread"
+       ;;
+    esac
     ;;
 esac
 else
-  OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''
+  OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''
 fi
 
 
 
 
+
 # -----------
 # Directories
 # -----------
@@ -10583,7 +10594,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10586 "configure"
+#line 10597 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10689,7 +10700,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10692 "configure"
+#line 10703 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11472,7 +11483,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then :
   enableval=$enable_sjlj_exceptions; :
 else
   cat > conftest.$ac_ext << EOF
-#line 11475 "configure"
+#line 11486 "configure"
 @interface Frob
 @end
 @implementation Frob
index 494a289ec60864294bfc353fdef616a232e98bba..35b724376cc8e31eb58f2360e4c6d4f6bc727c4e 100644 (file)
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 #   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004
-#   2005, 2006, 2009 Free Software Foundation, Inc.
+#   2005, 2006, 2009, 2011 Free Software Foundation, Inc.
 #   Originally contributed by Dave Love (d.love@dl.ac.uk).
 #
 #This file is part of GCC.
@@ -63,15 +63,25 @@ AC_ARG_ENABLE(objc-gc,
                           the GNU Objective-C runtime.],
 [case $enable_objc_gc in
   no)
+    OBJC_GCFLAGS=''
     OBJC_BOEHM_GC=''
     OBJC_BOEHM_GC_INCLUDES=''
     ;;
   *)
-    OBJC_BOEHM_GC=libobjc_gc.la
+    OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
+    OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
     OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
+    case "${host}" in
+      alpha*-dec-osf*)
+        # boehm-gc headers include <pthread.h>, which needs to be compiled
+       # with -pthread on Tru64 UNIX.
+        OBJC_GCFLAGS="${OBJC_GCFLAGS} -pthread"
+       ;;
+    esac
     ;;
 esac],
-[OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''])
+[OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''])
+AC_SUBST(OBJC_GCFLAGS)
 AC_SUBST(OBJC_BOEHM_GC)
 AC_SUBST(OBJC_BOEHM_GC_INCLUDES)