bug-libtool
[Top][All Lists]
Advanced

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

bug#8605: a libtool + Mac OS X problem


From: Peter Breitenlohner
Subject: bug#8605: a libtool + Mac OS X problem
Date: Mon, 2 May 2011 17:41:15 +0200 (CEST)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

Hi,

For a (static and/or shared) library libtool knows if and how that library
can be stripped, e.g.,

  for linux (ELF in general?)
    old_striplib="strip --strip-debug"
    striplib="strip --strip-unneeded"

  for mingw32 (cross)
    old_striplib="i386-pc-mingw32-strip --strip-debug"
    striplib="i386-pc-mingw32-strip --strip-unneeded"

  for darwin
    old_striplib="strip -S"
    striplib="strip -x"

====================

When linking a program that wants to dlopen() an extension module, I use
"libtool --mode=link gcc ... --export dynamic", e.g.,

  for linux
    export_dynamic_flag_spec="\${wl}--export-dynamic"

  for mingw32
    export_dynamic_flag_spec="\${wl}--export-all-symbols"

  for darwin
    export_dynamic_flag_spec=""

with no effect on Mac OS X

====================

When I finally use "make install-strip" to install that program, that works
fine on linux, because the ELF binary knows the global symbols even when the
the binary has been stripped.

However, this fails on Mac OS X, there the binary should be stripped with
'strip -S -x' or some such to keep the global symbols and not with plain
'strip' as done via (Automake) "make install-strip".

And there may, of course, be other non-ELF systems with the same problem.

IMHO, in such cases libtool should create a wrapper script even when not
linking against uninstalled shared libraries, and that warpper script should
cause "libtool --mode=install install -s ..." to use the required options
for strip.

Regards
Peter Breitenlohner <address@hidden>





reply via email to

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