[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thu, 16 May 2019 15:31:21 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
at GNU Wget2 we are just splitting a (shared) library into several
smaller ones, grouped by functionality.
We depend on gnulib and have a single libgnu.a. Each of the shared
libraries just need a certain set of functions from libgnu.a.
To avoid adding everything from libgnu.a to each of the libraries, we
would like to avoid "-Wl,--whole-archive ../lib/.libs/libgnu.a
There several ways to work around this situation (e.g. creating one
libgnu.a per library). The preferred one would be to have a new option
to libtool, '-no-whole-archive'.
A simple proof of concept is this patch:
--- libtool 2019-05-16 12:46:46.551527339 +0200
+++ libtool.no-whole-archive 2019-05-16 12:41:25.612879712 +0200
@@ -7700,6 +7700,11 @@
+ whole_archive_flag_spec="\$convenience "
Maybe you have a better idea !?
With this patch a current snippet from Makefile.am looks like
lib_LTLIBRARIES += libwget_progress.la
libwget_progress_la_SOURCES = bar.c
libwget_progress_la_CPPFLAGS = $(libwget_la_CPPFLAGS)
libwget_progress_la_LIBADD = ../lib/libgnu.la
libwget_progress_la_LDFLAGS = $(libwget_la_LDFLAGS) -no-whole-archive
If wanted, I am willing to write a real patch (some hints what to
consider would be nice - the codebase is currently unknown to me).
Description: OpenPGP digital signature
- Avoid -Wl,--whole-archive,
Tim Rühsen <=