[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pathces for darwin on HEAD
From: |
Peter O'Gorman |
Subject: |
Pathces for darwin on HEAD |
Date: |
Thu, 12 Aug 2004 23:48:35 +0900 |
User-agent: |
Mozilla Thunderbird 0.6 (Macintosh/20040502) |
Hi,
three little pacthes.
30-peter-nodyld_darwin8.patch
Apple have changed their headers (as you can see if you download cctools-532
from their opensource site) for Mac OS X 10.4 so that a "pointer" in the
mach-o/dyld.h file is no longer an "unsigned long" as it was on previous
darwin releases, it is a "void *" (as it should have been on previous
releases). Since dlopen ought not to have any problems on 10.4, I suggest
dropping the dyld loader altogether for Mac OS X 10.4 and later.
31-peter-darwin_couplet.patch
This came up before, and Gary suggested waitng until libtool-1.7. Since 2.0
is later than 1.7, I thought I'd ask again :-p.
32-peter-darwin_dylib_file.patch
Darwin links to way too many libraries at the moment, reduve that number by
using the -dylib_file flag to darwin's ld(1). I don't know why I didn't do
this in the first place. Madness perhaps.
Okay to apply?
Peter
--
Peter O'Gorman - http://www.pogma.com
Index: ChangeLog
2004-08-13 Peter O'Gorman <address@hidden>
* m4/libtool.m4 [darwin]: Don't use a libname triplet, a couplet
is perfectly fine.
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.90
diff -u -3 -p -u -r1.90 libtool.m4
--- m4/libtool.m4 12 Aug 2004 04:14:12 -0000 1.90
+++ m4/libtool.m4 12 Aug 2004 14:04:54 -0000
@@ -1750,7 +1750,7 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${versuffix}$shared_ext
${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ library_names_spec='${libname}${release}${major}$shared_ext
${libname}$shared_ext'
soname_spec='${libname}${release}${major}$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
Index: ChangeLog
2004-08-13 Peter O'Gorman <address@hidden>
* m4/ltdl.m4: Don't use the dyld loader on darwin 8 or later.
Index: m4/ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/ltdl.m4,v
retrieving revision 1.15
diff -u -3 -p -u -r1.15 ltdl.m4
--- m4/ltdl.m4 15 Jul 2004 12:14:48 -0000 1.15
+++ m4/ltdl.m4 12 Aug 2004 13:46:04 -0000
@@ -416,12 +416,14 @@ AC_CHECK_FUNC([shl_load],
LIBADD_SHL_LOAD="-ldld"])])
AC_SUBST([LIBADD_SHL_LOAD])
-AC_CHECK_FUNC([_dyld_func_lookup],
+case $host_os in
+darwin[[1567]].*)
+# We only want this for pre-Mac OS X 10.4.
+ AC_CHECK_FUNC([_dyld_func_lookup],
[AC_DEFINE([HAVE_DYLD], [1],
[Define if you have the _dyld_func_lookup function.])
LT_DLLOADERS="$LT_DLLOADERS dyld.la"])
-
-case $host_os in
+ ;;
beos*)
LT_DLLOADERS="$LT_DLLOADERS load_add_on.la"
;;
Index: ChangeLog
2004-08-13 Peter O'Gorman <address@hidden>
* config/ltmain.in [darwin]: Use the -dylib_file flag and avoid
linking to so many libraries on darwin.
Index: config/ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.in,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 ltmain.in
--- config/ltmain.in 3 Aug 2004 14:54:34 -0000 1.2
+++ config/ltmain.in 12 Aug 2004 14:08:19 -0000
@@ -3100,67 +3100,39 @@ EOF
;;
esac
if $GREP "^installed=no" $deplib > /dev/null; then
- path="$absdir/$objdir"
- else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool
archive" 1>&2
- exit $EXIT_FAILURE
- fi
- if test "$absdir" != "$libdir"; then
- $echo "$modename: warning: \`$deplib' seems to be moved"
1>&2
- fi
- path="$absdir"
- fi
- depdepl=
case $host in
*-*-darwin*)
- # we do not want to link against static libs,
- # but need to link against shared
+ depdepl=
eval deplibrary_names=`${SED} -n -e
's/^library_names=\(.*\)$/\1/p' $deplib`
if test -n "$deplibrary_names" ; then
for tmp in $deplibrary_names ; do
depdepl=$tmp
done
- if test -f "$path/$depdepl" ; then
- depdepl="$path/$depdepl"
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ eval darwin_install_name=`otool -L $depdepl | $SED -n -e
'3q;2,2p' | $SED -e 's/(.*//' | xargs`
+ compiler_flags="$compiler_flags ${wl}-dylib_file
${wl}${darwin_install_name}:${depdepl}"
+ linker_flags="$linker_flags -dylib_file
${darwin_install_name}:${depdepl}"
+ path=
fi
- # do not add paths which are already there
- case " $newlib_search_path " in
- *" $path "*) ;;
- *) newlib_search_path="$newlib_search_path $path";;
- esac
fi
- path=""
;;
*)
- path="-L$path"
- ;;
- esac
- ;;
-
- -l*)
- case $host in
- *-*-darwin*)
- # Again, we only want to link against shared libraries
- eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
- for tmp in $newlib_search_path ; do
- if test -f "$tmp/lib$tmp_libs.dylib" ; then
- eval depdepl="$tmp/lib$tmp_libs.dylib"
- break
- fi
- done
- path=""
+ path="-L$absdir/$objdir"
;;
- *) continue ;;
esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$deplib' is not a valid libtool
archive" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ if test "$absdir" != "$libdir"; then
+ $echo "$modename: warning: \`$deplib' seems to be moved"
1>&2
+ fi
+ path="-L$absdir"
+ fi
;;
-
- *) continue ;;
- esac
- case " $deplibs " in
- *" $depdepl "*) ;;
- *) deplibs="$depdepl $deplibs" ;;
esac
case " $deplibs " in
*" $path "*) ;;
- Pathces for darwin on HEAD,
Peter O'Gorman <=