[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
darwin7 diff
From: |
Peter O'Gorman |
Subject: |
darwin7 diff |
Date: |
Wed, 25 Jun 2003 09:40:14 +0900 |
Hi,
This patch changes the allow_undefined flag for darwin-7/Mac OS X 10.3
to be "-undefined dynamic_lookup" if the MACOSX_DEPLOYMENT_TARGET
environment variable is set to 10.3 or greater.
Also it fixes (I hope) a bug in ltdl.c where the dlerror string always
claimed it couldn't find symbol foo in /usr/lib/libSystem.dylib
(libSystem is always the last in the search order), so it now saves the
error from the first lookup and reports that instead.
Inline and attached.
BTW: What is the timeline for a 1.5.1 release?
Peter
Index: ChangeLog
===================================================================
RCS file: /cvsroot/libtool/libtool/ChangeLog,v
retrieving revision 1.1239
diff -u -d -b -w -u -r1.1239 ChangeLog
--- ChangeLog 11 Jun 2003 16:33:49 -0000 1.1239
+++ ChangeLog 25 Jun 2003 00:32:09 -0000
@@ -1,3 +1,12 @@
+2003-06-25 Peter O'Gorman <address@hidden>
+
+ * libtool.m4 (darwin): Use "-undefined dynamic_lookup" if the user
+ set MACOSX_DEPLOYMENT_TARGET to 10.3 or greater.
+
+ * libltdl/ltdl.c (dyld): Save the error from the first lookup to
report
+ in lt_dlerror(). Otherwise the error is always "Symbol _foo not in
/usr/
+ lib/libSystem.dylib". Thanks to Chris Zubrzycki for reporting this.
+
2003-06-11 Gary V. Vaughan <address@hidden>
* libtool.m4 (AC_LIBTOOL_COMPILER_OPTION): Require LT_AC_PROG_SED to
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.324
diff -u -d -b -w -u -r1.324 libtool.m4
--- libtool.m4 11 Jun 2003 16:33:49 -0000 1.324
+++ libtool.m4 25 Jun 2003 00:32:12 -0000
@@ -2558,7 +2558,18 @@
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
;;
*) # Darwin 1.3 on
- test -z ${LD_TWOLEVEL_NAMESPACE} &&
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined
suppress'
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace
-undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace
-undefined suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined
dynamic_lookup'
+ ;;
+ esac
+ fi
;;
esac
output_verbose_link_cmd='echo'
@@ -2884,7 +2895,18 @@
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
;;
*) # Darwin 1.3 on
- test -z ${LD_TWOLEVEL_NAMESPACE} &&
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined
suppress'
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace
-undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace
-undefined suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined
dynamic_lookup'
+ ;;
+ esac
+ fi
;;
esac
lt_int_apple_cc_single_mod=no
@@ -5335,7 +5357,18 @@
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
;;
*) # Darwin 1.3 on
- test -z ${LD_TWOLEVEL_NAMESPACE} &&
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined
suppress'
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace
-undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace
-undefined suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined
dynamic_lookup'
+ ;;
+ esac
+ fi
;;
esac
lt_int_apple_cc_single_mod=no
Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.177
diff -u -d -b -w -u -r1.177 ltdl.c
--- libltdl/ltdl.c 3 Jun 2003 15:36:58 -0000 1.177
+++ libltdl/ltdl.c 25 Jun 2003 00:32:14 -0000
@@ -1870,6 +1870,7 @@
NSSymbol *nssym = 0;
void *unused;
const struct mach_header *mh=NULL;
+ char saveError[256] = "Symbol not found";
if (module == (lt_module)-1)
{
_dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused);
@@ -1900,12 +1901,14 @@
}
if (!nssym)
{
+ strncpy(saveError,
lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)), 255);
+ saveError[255] = 0;
if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module);
nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh);
}
if (!nssym)
{
- LT_DLMUTEX_SETERROR
(lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)));
+ LT_DLMUTEX_SETERROR (saveError);
return NULL;
}
return NSAddressOfSymbol(nssym);
darwin7.diff.gz
Description: GNU Zip compressed data
- darwin7 diff,
Peter O'Gorman <=