From b98b952feb6aea1e33371d0b64a9622603ac146e Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Fri, 15 Apr 2011 09:26:05 +0000 Subject: [PATCH] re PR libobjc/32037 (--enable-objc-gc on OS X won't build) 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 | 8 ++++++++ libobjc/Makefile.in | 2 +- libobjc/configure | 21 ++++++++++++++++----- libobjc/configure.ac | 16 +++++++++++++--- 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index 485d2a4b513..a2917044290 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,11 @@ +2011-04-15 Rainer Orth + + 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 * selector.c (sel_getTypedSelector): Return NULL if there are diff --git a/libobjc/Makefile.in b/libobjc/Makefile.in index b33c989e6d2..e52f441d47a 100644 --- a/libobjc/Makefile.in +++ b/libobjc/Makefile.in @@ -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) diff --git a/libobjc/configure b/libobjc/configure index 8f670e132e5..9c3f621c889 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -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 , 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 diff --git a/libobjc/configure.ac b/libobjc/configure.ac index 494a289ec60..35b724376cc 100644 --- a/libobjc/configure.ac +++ b/libobjc/configure.ac @@ -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 , 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) -- 2.30.2