Makefile.in (extra_ldflags_libobjc): New.

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.

From-SVN: r103064
This commit is contained in:
Andrew Pinski 2005-08-13 23:44:14 +00:00 committed by Andrew Pinski
parent 4f5dce2b35
commit a5a813f891
5 changed files with 36 additions and 11 deletions

View 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

View 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.

16
libobjc/configure vendored
View File

@ -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

View 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)

View File

@ -38,9 +38,3 @@ void __objc_linking (void)
[NXConstantString name];
}
#ifdef __APPLE__
void _objcInit(void)
{
}
#endif