libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool 2.2.2, darwin and target prefixes


From: Peter O'Gorman
Subject: Re: libtool 2.2.2, darwin and target prefixes
Date: Thu, 01 May 2008 13:03:16 -0500
User-agent: Thunderbird 2.0.0.9 (X11/20071115)

Richard Purdie wrote:
> Hi,
> 
> As previously mentioned, I've been stress testing libtool 2.2.2 with
> Poky a bit.
> 
> I've found one issue when I tested the darwin builds, specifically that
> it tried to use "otool" and "otool64" and not the versions with the host
> prefix which my setup has. I fixed this with the patch below which is
> fine for Poky since its always cross compiling but its a sign a better
> fix is probably needed in general.

Thanks,
I have pushed this, it also cleans up the sed sed echo ickyness.

Peter
-- 
Peter O'Gorman
http://pogma.com
>From 92e15986a43a8009decffc4d5d290272449487a4 Mon Sep 17 00:00:00 2001
From: Peter O'Gorman <address@hidden>
Date: Thu, 1 May 2008 12:40:24 -0500
Subject: [PATCH] Use AC_CHECK_TOOL for otool and otool64.

* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check.
* libltdl/config/ltmain.m4sh (func_mode_link): Use.
Reported by Richard Purdie <address@hidden>
---
 ChangeLog                  |    7 +++++++
 libltdl/config/ltmain.m4sh |    6 ++----
 libltdl/m4/libtool.m4      |    6 ++++++
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b3c0616..5db30d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-05-01  Peter O'Gorman  <address@hidden>
+
+       Use AC_CHECK_TOOL for otool and otool64.
+       * libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check.
+       * libltdl/config/ltmain.m4sh (func_mode_link): Use.
+       Reported by Richard Purdie <address@hidden>
+
 2008-04-30  Eric Blake  <address@hidden>
 
        Support cygwin 1.7.0 in loadlibrary loader.
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index ac334dc..84f7078 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -4951,11 +4951,9 @@ func_mode_link ()
                    done
                    if test -f "$absdir/$objdir/$depdepl" ; then
                      depdepl="$absdir/$objdir/$depdepl"
-                     darwin_install_name=`otool -L $depdepl | $SED -n -e 
'3q;2,2p' | $SED -e 's/(.*//'`
-                     darwin_install_name=`$ECHO $darwin_install_name`
+                     darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR 
== 2) {print $1;exit}}`
                       if test -z "$darwin_install_name"; then
-                          darwin_install_name=`otool64 -L $depdepl | $SED -n 
-e '3q;2,2p' | $SED -e 's/(.*//'`
-                          darwin_install_name=`$ECHO $darwin_install_name`
+                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk 
'{if (NR == 2) {print $1;exit}}`
                       fi
                      compiler_flags="$compiler_flags ${wl}-dylib_file 
${wl}${darwin_install_name}:${depdepl}"
                      linker_flags="$linker_flags -dylib_file 
${darwin_install_name}:${depdepl}"
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 9906e11..c23451a 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -894,12 +894,18 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
     AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
     _LT_DECL([], [DSYMUTIL], [1],
       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
     _LT_DECL([], [NMEDIT], [1],
       [Tool to change global to local symbols on Mac OS X])
     _LT_DECL([], [LIPO], [1],
       [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
 
     AC_CACHE_CHECK([for -single_module linker 
flag],[lt_cv_apple_cc_single_mod],
       [lt_cv_apple_cc_single_mod=no
-- 
1.5.3.7


reply via email to

[Prev in Thread] Current Thread [Next in Thread]