[Top][All Lists]

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

[PATCH] Strip DWARF-2 debug information for libraries on Darwin.

From: Peter O'Gorman
Subject: [PATCH] Strip DWARF-2 debug information for libraries on Darwin.
Date: Sun, 05 Oct 2008 12:03:24 -0500
User-agent: Thunderbird (X11/20080501)


I don't really like running strip (or dsymutil) on the library, but the
debug information that is stored in the library/executable is really
only paths to and uuids of the object files, and libtool may have
removed those if convenience libraries were used. The .dSYM bundle
contains all of the debug information from the object files (even those
that we removed).

I forgot to update ChangeLog, will fix before pushing.


Peter O'Gorman
>From 98a593ea73377759e0e7688822116d7cb3353a70 Mon Sep 17 00:00:00 2001
From: Peter O'Gorman <address@hidden>
Date: Sun, 5 Oct 2008 11:51:40 -0500
Subject: [PATCH] Strip DWARF-2 debug information for libraries on Darwin.

* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Run strip -S after 
dsymutil if dsymutil created output.
 libltdl/m4/libtool.m4 |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index caf88b1..ecf8439 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -968,7 +968,21 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
       _lt_dar_export_syms='~$NMEDIT -s 
$output_objdir/${libname}-symbols.expsym ${lib}'
     if test "$DSYMUTIL" != ":"; then
-      _lt_dsymutil='~$DSYMUTIL $lib || :'
+      # If darwin's ld ever gets a --whole-archive, --no-whole-archive
+      # equivalant that allows loading all members of specified
+      # archives, then we will test for it and no longer run dsymutil
+      # or strip, returning control to the user/developer. Until that
+      # time, we create a .dSYM bundle that can be used for debugging
+      # (even after the library has been stripped) but must be
+      # somewhere that gdb can find it. Because we do not install the
+      # .dSYM bundle, the developer may have to move it to the
+      # installed location if she wishes to debug an installed
+      # library. I wish they stored the debug information in the
+      # output, instead of separate files.
+      # We rm the .dSYM directory first, and run strip only if a .dSYM
+      # directory has been created, this should allow for the -gstabs
+      # case.
+      _lt_dsymutil='~${RM}r ${lib}.dSYM~$DSYMUTIL $lib || :~test -d 
${lib}.dSYM && $STRIP -S $lib'

reply via email to

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