OSDN Git Service

2005-08-13 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Aug 2005 23:44:14 +0000 (23:44 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Aug 2005 23:44:14 +0000 (23:44 +0000)
        * Makefile.in (extra_ldflags_libobjc): New.
        (libobjc$(libext).la): Add extra_ldflags_libobjc to the link line.
        (libobjc_gc$(libext).la): Likewise.
        * configure.ac (extra_ldflags_libgfortran): Set for *-darwin* to
        "-Wl,-single_module".
        * configure: Regenerate.
        * linking.m (_objcInit): Remove.

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

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

index 4456989..ecd5685 100644 (file)
@@ -1,3 +1,13 @@
+2005-08-13  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * Makefile.in (extra_ldflags_libobjc): New.
+       (libobjc$(libext).la): Add extra_ldflags_libobjc to the link line.
+       (libobjc_gc$(libext).la): Likewise.
+       * configure.ac (extra_ldflags_libgfortran): Set for *-darwin* to
+       "-Wl,-single_module".
+       * configure: Regenerate.
+       * linking.m (_objcInit): Remove.
+
 2005-07-26  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR libobjc/22606
index 4dd1f9d..b9c216b 100644 (file)
@@ -44,6 +44,8 @@ toolexeclibdir = @toolexeclibdir@
 includedirname = @includedirname@
 libext = @libext@
 
+extra_ldflags_libobjc = @extra_ldflags_libobjc@
+
 top_builddir = .
 
 libdir = $(exec_prefix)/lib
@@ -271,12 +273,12 @@ doc: info dvi html
 libobjc$(libext).la: $(OBJS)
        $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
                -rpath $(toolexeclibdir) \
-               -version-info $(LIBOBJC_VERSION)
+               -version-info $(LIBOBJC_VERSION) $(extra_ldflags_libobjc)
 
 libobjc_gc$(libext).la: $(OBJS_GC)
        $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) \
                -rpath $(toolexeclibdir) \
-               -version-info $(LIBOBJC_GC_VERSION)
+               -version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc)
 
 #
 # FIXME -- The following part does not fit in the libtool context. 
index 15e7f2f..f28e0c4 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 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_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 toolexecdir toolexeclibdir includedirname libext CC ac_ct_CC EXEEXT OBJEXT extra_ldflags_libobjc 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.
@@ -2612,6 +2612,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+# extra LD Flags which are required for targets
+case "${host}" in
+  *-darwin*)
+    # Darwin needs -single_module when linking libobjc
+    extra_ldflags_libobjc=-Wl,-single_module
+    ;;
+esac
+
+
 
 
 if test -n "$ac_tool_prefix"; then
@@ -3756,7 +3765,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 3759 "configure"' > conftest.$ac_ext
+  echo '#line 3768 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -5184,7 +5193,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then
   :
 else
   cat > conftest.$ac_ext << EOF
-#line 5187 "configure"
+#line 5196 "configure"
 @interface Frob
 @end
 @implementation Frob
@@ -5916,6 +5925,7 @@ s,@CC@,$CC,;t t
 s,@ac_ct_CC@,$ac_ct_CC,;t t
 s,@EXEEXT@,$EXEEXT,;t t
 s,@OBJEXT@,$OBJEXT,;t t
+s,@extra_ldflags_libobjc@,$extra_ldflags_libobjc,;t t
 s,@CFLAGS@,$CFLAGS,;t t
 s,@AS@,$AS,;t t
 s,@ac_ct_AS@,$ac_ct_AS,;t t
index 149d7e5..bf5fe7b 100644 (file)
@@ -178,6 +178,15 @@ m4_define([_AC_ARG_VAR_PRECIOUS],[])
 AC_PROG_CC
 m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
 
+# extra LD Flags which are required for targets
+case "${host}" in
+  *-darwin*)
+    # Darwin needs -single_module when linking libobjc
+    extra_ldflags_libobjc=-Wl,-single_module
+    ;;
+esac
+AC_SUBST(extra_ldflags_libobjc)
+
 AC_SUBST(CFLAGS)
 
 AC_CHECK_TOOL(AS, as)
index 7a5c047..a54ae01 100644 (file)
@@ -38,9 +38,3 @@ void __objc_linking (void)
   [NXConstantString name];
 }
 
-#ifdef __APPLE__
-void _objcInit(void)
-{
-}
-#endif
-