OSDN Git Service

2005-02-28 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Feb 2005 20:04:41 +0000 (20:04 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Feb 2005 20:04:41 +0000 (20:04 +0000)
        PR libobjc/20252
        * Makefile.in (GTHREAD_FLAGS): Remove.
        (ALL_CFLAGS): Remove usage of GTHREAD_FLAGS.
        * thr-objc.c: Include config.h.
        * configure.ac: Instead of looking at GCC's makefile, figure out if
        GTHREAD_FLAGS should be defined by looking at the `thread model'
        of the current gcc.
        * configure: Regenerate.
        * config.h.in: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95696 138bc75d-0d04-0410-961f-82ee72b054a4

libobjc/ChangeLog
libobjc/Makefile.in
libobjc/config.h.in
libobjc/configure
libobjc/configure.ac
libobjc/thr-objc.c

index 278cde2..1edd668 100644 (file)
@@ -1,3 +1,15 @@
+2005-02-28  Andrew Pinski <pinskia@physics.uc.edu>
+
+       PR libobjc/20252
+       * Makefile.in (GTHREAD_FLAGS): Remove.
+       (ALL_CFLAGS): Remove usage of GTHREAD_FLAGS.
+       * thr-objc.c: Include config.h.
+       * configure.ac: Instead of looking at GCC's makefile, figure out if
+       GTHREAD_FLAGS should be defined by looking at the `thread model'
+       of the current gcc.
+       * configure: Regenerate.
+       * config.h.in: Regenerate.
+
 2005-02-28  Paolo Bonzini  <bonzini@gnu.org>
 
        PR bootstrap/17383
index 23af100..3c09183 100644 (file)
@@ -72,9 +72,8 @@ RANLIB = @RANLIB@
 CC = @CC@
 CFLAGS = @CFLAGS@
 WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes
-GTHREAD_FLAGS=@GTHREAD_FLAGS@
 ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \
-       $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing
+       -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing
 
 # Libtool
 # The following strings describe the version of the obj-C library 
index 700e045..51811a5 100644 (file)
@@ -1,5 +1,8 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Define if the compiler has a thread header that is non single. */
+#undef HAVE_GTHR_DEFAULT
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
index 71bd0a7..893645a 100755 (executable)
@@ -309,7 +309,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_subdir host_subdir target_subdir VERSION OBJC_BOEHM_GC toplevel_srcdir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical glibcpp_srcdir gcc_version_trigger gcc_version_full gcc_version toolexecdir toolexeclibdir includedirname libext CC ac_ct_CC EXEEXT OBJEXT CFLAGS AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LN_S STRIP ac_ct_STRIP LIBTOOL SET_MAKE CPP CPPFLAGS EGREP GTHREAD_FLAGS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_subdir host_subdir target_subdir VERSION OBJC_BOEHM_GC toplevel_srcdir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical glibcpp_srcdir gcc_version_trigger gcc_version_full gcc_version toolexecdir toolexeclibdir includedirname libext CC ac_ct_CC EXEEXT OBJEXT CFLAGS AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LN_S STRIP ac_ct_STRIP LIBTOOL SET_MAKE CPP CPPFLAGS EGREP LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -5111,26 +5111,19 @@ done
 # Miscellanea
 # -----------
 
-# Determine CFLAGS for gthread.
-echo "$as_me:$LINENO: checking for gthread cflags" >&5
-echo $ECHO_N "checking for gthread cflags... $ECHO_C" >&6
-if test "${objc_cv_gthread_flags+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # we know we are compiled as a target library, so the toplevel build directory
-# is ../..
-if test -f ../../$host_subdir/gcc/Makefile
-then
-  objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS ../../$host_subdir/gcc/Makefile | awk -F= '{ print $2 }'`
-else
-  { { echo "$as_me:$LINENO: error: not found" >&5
-echo "$as_me: error: not found" >&2;}
-   { (exit 1); exit 1; }; }
-fi
+echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
+echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6
+target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
+echo "$as_me:$LINENO: result: $target_thread_file" >&5
+echo "${ECHO_T}$target_thread_file" >&6
+
+if test $target_thread_file != single; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GTHR_DEFAULT 1
+_ACEOF
+
 fi
-echo "$as_me:$LINENO: result: $objc_cv_gthread_flags" >&5
-echo "${ECHO_T}$objc_cv_gthread_flags" >&6
-GTHREAD_FLAGS=$objc_cv_gthread_flags
 
 
 echo "$as_me:$LINENO: checking for exception model to use" >&5
@@ -5147,7 +5140,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then
   :
 else
   cat > conftest.$ac_ext << EOF
-#line 5150 "configure"
+#line 5143 "configure"
 @interface Frob
 @end
 @implementation Frob
@@ -5903,7 +5896,6 @@ s,@SET_MAKE@,$SET_MAKE,;t t
 s,@CPP@,$CPP,;t t
 s,@CPPFLAGS@,$CPPFLAGS,;t t
 s,@EGREP@,$EGREP,;t t
-s,@GTHREAD_FLAGS@,$GTHREAD_FLAGS,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 CEOF
index 5e56fb7..8c554b5 100644 (file)
@@ -218,18 +218,15 @@ AC_CHECK_HEADERS(sched.h)
 # Miscellanea
 # -----------
 
-# Determine CFLAGS for gthread.
-AC_CACHE_CHECK([for gthread cflags],objc_cv_gthread_flags,
-[# we know we are compiled as a target library, so the toplevel build directory
-# is ../..
-if test -f ../../$host_subdir/gcc/Makefile
-then
-  objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS ../../$host_subdir/gcc/Makefile | awk -F= '{ print $2 }'`
-else
-  AC_MSG_ERROR([not found])
-fi])
-GTHREAD_FLAGS=$objc_cv_gthread_flags
-AC_SUBST(GTHREAD_FLAGS)
+AC_MSG_CHECKING([for thread model used by GCC])
+target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
+AC_MSG_RESULT([$target_thread_file]) 
+
+if test $target_thread_file != single; then
+  AC_DEFINE(HAVE_GTHR_DEFAULT, 1,
+        [Define if the compiler has a thread header that is non single.])
+fi 
+
 
 AC_MSG_CHECKING([for exception model to use])
 AC_LANG_PUSH(C)
index 5afef68..d954f93 100644 (file)
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA.  */
    covered by the GNU General Public License.  */
 
 #define _LIBOBJC
+#include "config.h"
 #include "tconfig.h"
 #include "coretypes.h"
 #include "tm.h"