[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI PATCH: Fix Darwin's C++ handling
From: |
Robert Boehne |
Subject: |
FYI PATCH: Fix Darwin's C++ handling |
Date: |
Mon, 30 Dec 2002 23:15:34 -0600 |
Hello,
After looking into building some things on Darwin, I noticed
that C++ is not treated the way C is, and the current Libtool
defaults to g++ behavior which is broken under Mac OS X.
This patch is basically a copy of the C stuff for C++ and it
works. ;) I consider this an obvious bugfix, and since it
only changes C++ behavior under Darwin, I'm going to check it
in right away.
Cheers!
Robert
2002-12-19 Robert Boehne <address@hidden>
* libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG): Copy the section
for Darwin from AC_LIBTOOL_PROG_LD_SHLIBS so that the CXX
tag doesn't use the g++ defaults for the OS X compiler.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.281
diff -u -r1.281 libtool.m4
--- libtool.m4 18 Dec 2002 21:04:45 -0000 1.281
+++ libtool.m4 20 Dec 2002 05:18:28 -0000
@@ -2714,6 +2714,28 @@
fi
;;
+ darwin* | rhapsody*)
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined
suppress'
+ ;;
+ esac
+
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes. Also zsh mangles
+ # `"' quotes if we put them in here... so don't!
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load
-keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test
.$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o
$lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo
-install_name $rpath/$soname $verstring)'
+ # We need to add '_' to the symbols in $export_symbols first
+ #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds,
$1)"' && strip -s $export_symbols'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ ;;
+
dgux*)
case $cc_basename in
ec++)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI PATCH: Fix Darwin's C++ handling,
Robert Boehne <=