freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
- To: <freetds AT lists.ibiblio.org>
- Subject: [freetds] Patch for Mac OS X
- Date: Tue, 30 Dec 2003 17:00:58 +0100
I searched where to apply patch in distribution and I found this code
(in ltcf-c.sh)
darwin* | rhapsody*)
case "$host_os" in
rhapsody* | darwin1.[012])
allow_undefined_flag='-undefined suppress'
;;
*) # Darwin 1.3 on
allow_undefined_flag='-flat_namespace -undefined suppress'
;;
esac
archive_cmds='$CC $(if test .$module = .yes; then echo -bundle; else
echo -dynamiclib; fi) $allow_undefined_flag -o $lib $libobjs $deplibs
$linkopts -install_name $rpath/$soname $verstring'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols
$lib'
hardcode_direct=yes
hardcode_shlibpath_var=no
whole_archive_flag_spec='-all_load $convenience'
;;
so the line is processed only on Apple machines (rhapsody is another
Apple platform)... I don't have this file, the code it's in my configure
script, however is much more complex:
darwin* | rhapsody*)
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
archive_cmds_need_lc=no
case "$host_os" in
rhapsody* | darwin1.[012])
allow_undefined_flag='-undefined suppress'
;;
*) # Darwin 1.3 on
test -z ${LD_TWOLEVEL_NAMESPACE} &&
allow_undefined_flag='-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_int_apple_cc_single_mod=no
output_verbose_link_cmd='echo'
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
lt_int_apple_cc_single_mod=yes
fi
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
archive_cmds='$CC -dynamiclib -single_module
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags
-install_name $rpath/$soname $verstring'
else
archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs
-nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib
$allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags
-install_name $rpath/$soname $verstring'
fi
module_cmds='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag
-o $lib $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it
doesn't exist in older darwin ld's
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e
"s,^\(..*\),_&," < $export_symbols >
$output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags
-install_name $rpath/$soname $verstring~nmedit -s
$output_objdir/${libname}-symbols.expsym ${lib}'
else
archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e
"s,^\(..*\),_&," < $export_symbols >
$output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load
-keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC
-dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs
$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s
$output_objdir/${libname}-symbols.expsym ${lib}'
fi
module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e
"s,^\(..*\),_&," < $export_symbols >
$output_objdir/${libname}-symbols.expsym~$CC -bundle
$allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit
-s $output_objdir/${libname}-symbols.expsym ${lib}'
hardcode_direct=no
hardcode_automatic=yes
hardcode_shlibpath_var=unsupported
whole_archive_flag_spec='-all_load $convenience'
link_all_deplibs=yes
fi
;;
I don't understand why darwin it's so different !!! I hope one day will
have more compatible tools >:-<
freddy77
- [freetds] Patch for Mac OS X, ZIGLIO Frediano, 12/30/2003
Archive powered by MHonArc 2.6.24.