Commit 6886e18e by Andrew Pinski Committed by Andrew Pinski

re PR libobjc/20252 (Libobjc build broken)

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.

From-SVN: r95696
parent d436d3de
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> 2005-02-28 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/17383 PR bootstrap/17383
......
...@@ -72,9 +72,8 @@ RANLIB = @RANLIB@ ...@@ -72,9 +72,8 @@ RANLIB = @RANLIB@
CC = @CC@ CC = @CC@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes
GTHREAD_FLAGS=@GTHREAD_FLAGS@
ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \ 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 # Libtool
# The following strings describe the version of the obj-C library # The following strings describe the version of the obj-C library
......
/* config.h.in. Generated from configure.ac by autoheader. */ /* 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. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
......
...@@ -309,7 +309,7 @@ ac_includes_default="\ ...@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h> # include <unistd.h>
#endif" #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='' ac_subst_files=''
# Initialize some variables set by options. # Initialize some variables set by options.
...@@ -5111,26 +5111,19 @@ done ...@@ -5111,26 +5111,19 @@ done
# Miscellanea # Miscellanea
# ----------- # -----------
# Determine CFLAGS for gthread. echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
echo "$as_me:$LINENO: checking for gthread cflags" >&5 echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6
echo $ECHO_N "checking for gthread cflags... $ECHO_C" >&6 target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
if test "${objc_cv_gthread_flags+set}" = set; then echo "$as_me:$LINENO: result: $target_thread_file" >&5
echo $ECHO_N "(cached) $ECHO_C" >&6 echo "${ECHO_T}$target_thread_file" >&6
else
# we know we are compiled as a target library, so the toplevel build directory if test $target_thread_file != single; then
# is ../..
if test -f ../../$host_subdir/gcc/Makefile cat >>confdefs.h <<\_ACEOF
then #define HAVE_GTHR_DEFAULT 1
objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS ../../$host_subdir/gcc/Makefile | awk -F= '{ print $2 }'` _ACEOF
else
{ { echo "$as_me:$LINENO: error: not found" >&5
echo "$as_me: error: not found" >&2;}
{ (exit 1); exit 1; }; }
fi
fi 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 echo "$as_me:$LINENO: checking for exception model to use" >&5
...@@ -5147,7 +5140,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then ...@@ -5147,7 +5140,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then
: :
else else
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 5150 "configure" #line 5143 "configure"
@interface Frob @interface Frob
@end @end
@implementation Frob @implementation Frob
...@@ -5903,7 +5896,6 @@ s,@SET_MAKE@,$SET_MAKE,;t t ...@@ -5903,7 +5896,6 @@ s,@SET_MAKE@,$SET_MAKE,;t t
s,@CPP@,$CPP,;t t s,@CPP@,$CPP,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@EGREP@,$EGREP,;t t s,@EGREP@,$EGREP,;t t
s,@GTHREAD_FLAGS@,$GTHREAD_FLAGS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF CEOF
......
...@@ -218,18 +218,15 @@ AC_CHECK_HEADERS(sched.h) ...@@ -218,18 +218,15 @@ AC_CHECK_HEADERS(sched.h)
# Miscellanea # Miscellanea
# ----------- # -----------
# Determine CFLAGS for gthread. AC_MSG_CHECKING([for thread model used by GCC])
AC_CACHE_CHECK([for gthread cflags],objc_cv_gthread_flags, target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
[# we know we are compiled as a target library, so the toplevel build directory AC_MSG_RESULT([$target_thread_file])
# is ../..
if test -f ../../$host_subdir/gcc/Makefile if test $target_thread_file != single; then
then AC_DEFINE(HAVE_GTHR_DEFAULT, 1,
objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS ../../$host_subdir/gcc/Makefile | awk -F= '{ print $2 }'` [Define if the compiler has a thread header that is non single.])
else fi
AC_MSG_ERROR([not found])
fi])
GTHREAD_FLAGS=$objc_cv_gthread_flags
AC_SUBST(GTHREAD_FLAGS)
AC_MSG_CHECKING([for exception model to use]) AC_MSG_CHECKING([for exception model to use])
AC_LANG_PUSH(C) AC_LANG_PUSH(C)
......
...@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */
covered by the GNU General Public License. */ covered by the GNU General Public License. */
#define _LIBOBJC #define _LIBOBJC
#include "config.h"
#include "tconfig.h" #include "tconfig.h"
#include "coretypes.h" #include "coretypes.h"
#include "tm.h" #include "tm.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment