mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-12 14:06:37 +08:00
* libltdl/ltdl.c (dyld): Remove some debug printf's, fix a bug.
* ltmain.in (darwin): Only link against shared libraries when doing link_all_deplibs.
This commit is contained in:
parent
cd04eb7011
commit
eeb3d9cc7c
@ -1,3 +1,9 @@
|
||||
2003-03-28 Peter O'Gorman <peter@pogma.com>
|
||||
|
||||
* libltdl/ltdl.c (dyld): Remove some debug printf's, fix a bug.
|
||||
* ltmain.in (darwin): Only link against shared libraries when doing
|
||||
link_all_deplibs.
|
||||
|
||||
2003-03-25 Robert Boehne <rboehne@gnu.org>
|
||||
|
||||
* bootstrap: Add f77demo to the directories that AUTOHEADER
|
||||
|
@ -1583,10 +1583,6 @@ static struct lt_user_dlloader sys_dld = {
|
||||
# include <mach-o/dyld.h>
|
||||
#endif
|
||||
#include <mach-o/getsect.h>
|
||||
/*
|
||||
sectname __mod_term_func
|
||||
segname __DATA
|
||||
*/
|
||||
|
||||
/* We have to put some stuff here that isn't in older dyld.h files */
|
||||
#ifndef ENUM_DYLD_BOOL
|
||||
@ -1729,7 +1725,6 @@ lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh)
|
||||
unsigned long offset = sizeof(struct mach_header);
|
||||
NSSymbol retSym = 0;
|
||||
const struct mach_header *mh1;
|
||||
fprintf(stderr,"Symbol: %s\n",symbol);
|
||||
if ((ltdl_NSLookupSymbolInImage) && NSIsSymbolNameDefined(symbol) )
|
||||
{
|
||||
for (j = 0; j < mh->ncmds; j++)
|
||||
@ -1737,8 +1732,6 @@ lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh)
|
||||
lc = (struct load_command*)(((unsigned long)mh) + offset);
|
||||
if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd))
|
||||
{
|
||||
fprintf(stderr,"Symbol %s\n",(char*)(((struct dylib_command*)lc)->dylib.name.offset +
|
||||
(unsigned long)lc));
|
||||
mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct dylib_command*)lc)->dylib.name.offset +
|
||||
(unsigned long)lc));
|
||||
if (!mh1)
|
||||
@ -1855,8 +1848,11 @@ sys_dyld_close (loader_data, module)
|
||||
#ifdef __ppc__
|
||||
flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
|
||||
#endif
|
||||
retCode = NSUnLinkModule(module,flags);
|
||||
|
||||
if (!NSUnLinkModule(module,flags))
|
||||
{
|
||||
retCode=1;
|
||||
LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_CLOSE)));
|
||||
}
|
||||
}
|
||||
|
||||
return retCode;
|
||||
|
38
ltmain.in
38
ltmain.in
@ -2515,7 +2515,6 @@ EOF
|
||||
if test "$link_all_deplibs" != no; then
|
||||
# Add the search paths of all dependency libraries
|
||||
for deplib in $dependency_libs; do
|
||||
depdepl=
|
||||
case $deplib in
|
||||
-L*) path="$deplib" ;;
|
||||
*.la)
|
||||
@ -2548,28 +2547,37 @@ EOF
|
||||
depdepl=
|
||||
case $host in
|
||||
*-*-darwin*)
|
||||
depdepl=`$echo "X$deplib" | ${SED} -e 's,.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
newlib_search_path="$newlib_search_path $path"
|
||||
if grep "^installed=no" $deplib > /dev/null; then
|
||||
# FIXME - ugly
|
||||
if test -f "$path/lib${depdepl}.dylib" ; then
|
||||
eval depdepl=$path/lib${depdepl}.dylib
|
||||
else
|
||||
# We shouldn't get here
|
||||
depdepl="-l$depdepl"
|
||||
# we do not want to link against static libs, but need to link against shared
|
||||
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"
|
||||
fi
|
||||
else
|
||||
depdepl="-l$depdepl"
|
||||
newlib_search_path="$newlib_search_path $path"
|
||||
path=""
|
||||
fi
|
||||
;;
|
||||
# end ugly FIXME
|
||||
esac
|
||||
*)
|
||||
path="-L$path"
|
||||
;;
|
||||
esac
|
||||
|
||||
;;
|
||||
-l*)
|
||||
case $host in
|
||||
*-*-darwin*)
|
||||
depdepl=$deplib
|
||||
# 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=""
|
||||
;;
|
||||
*) continue ;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user