mirror of
https://gitlab.com/gnuwget/wget2.git
synced 2025-08-16 17:37:56 +00:00
Patch libtool to add -no-whole-archive
* cfg.mk: Exclude contrib/libtool.patch from 'make syntax-check' * configure.ac: Patch libtool * contrib/libtool.patch: New file * lib/Makefile.am: Unset $LIBS * libwget/Makefile.am: Use -no-whole-archive This patch keeps the libwget libraries short by not adding *everything* from lib/libgnu.a.
This commit is contained in:
2
cfg.mk
2
cfg.mk
@ -14,7 +14,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Explicit syntax-check exceptions.
|
||||
VC_LIST_ALWAYS_EXCLUDE_REGEX = ^data/.*|tests/(files|gpg|certs)/.*|.*\.png|^fuzz/.*\.(in|repro)/.*$$
|
||||
VC_LIST_ALWAYS_EXCLUDE_REGEX = ^data/.*|tests/(files|gpg|certs)/.*|.*\.png|^fuzz/.*\.(in|repro)/.*|^contrib/libtool.patch$$
|
||||
|
||||
# Syntax Check Rules that we want to skip
|
||||
# * sc_immutable_NEWS: I can't make this test ever pass. If someone fixes it,
|
||||
|
@ -876,6 +876,7 @@ AM_CONDITIONAL([PLUGIN_SUPPORT], [test "x$plugin_support" = xyes])
|
||||
|
||||
AC_SUBST([TEST_CFLAGS])
|
||||
AC_SUBST([TEST_LIBS])
|
||||
AC_SUBST([ALL_LIBS], $LIBS)
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([\
|
||||
@ -909,6 +910,9 @@ AS_IF([test "x$with_ssl" == xwolfssl && test "x$with_wolfssl" == xno], [ssl_enab
|
||||
[test "x$with_ssl" == xgnutls && test "x$with_gnutls" == xno], [ssl_enabled="(not found)"],
|
||||
[])
|
||||
|
||||
# patching libtool, generated when coming here
|
||||
patch libtool contrib/libtool.patch
|
||||
|
||||
AC_MSG_NOTICE([Summary of build options:
|
||||
|
||||
Version: ${PACKAGE_VERSION}
|
||||
|
14
contrib/libtool.patch
Normal file
14
contrib/libtool.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- 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 @@
|
||||
continue
|
||||
;;
|
||||
|
||||
+ -no-whole-archive)
|
||||
+ whole_archive_flag_spec="\$convenience "
|
||||
+ continue
|
||||
+ ;;
|
||||
+
|
||||
-objectlist)
|
||||
prev=objectlist
|
||||
continue
|
@ -5,6 +5,7 @@ BUILT_SOURCES =
|
||||
MOSTLYCLEANDIRS =
|
||||
CLEANFILES =
|
||||
SUFFIXES =
|
||||
LIBS =
|
||||
|
||||
AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
|
||||
|
@ -1,5 +1,15 @@
|
||||
AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS) $(CODE_COVERAGE_CFLAGS) $(MANYWARNINGS) -DBUILDING_LIBWGET
|
||||
|
||||
# $(ALL_LIBS) is set to $LIBS in configure.ac
|
||||
LIBS =
|
||||
|
||||
libwget_libadd = \
|
||||
$(LIBOBJS) $(GETADDRINFO_LIB) $(GETHOSTNAME_LIB) $(HOSTENT_LIB) $(INET_NTOP_LIB) $(INET_PTON_LIB) \
|
||||
$(LIBMULTITHREAD) $(LIBSOCKET) $(LIBTHREAD) $(LIB_CLOCK_GETTIME) $(LIB_CRYPTO) $(LIB_GETLOGIN) \
|
||||
$(LIB_HARD_LOCALE) $(LIB_MBRTOWC) $(LIB_NANOSLEEP) $(LIB_POLL) $(LIB_POSIX_SPAWN) $(LIB_PTHREAD_SIGMASK) \
|
||||
$(LIB_SELECT) $(LIB_SETLOCALE) $(LIB_SETLOCALE_NULL) $(LTLIBICONV) $(LTLIBINTL) $(SERVENT_LIB) @INTL_MACOSX_LIBS@ \
|
||||
$(ALL_LIBS) ../lib/libgnu.la $(CODE_COVERAGE_LIBS)
|
||||
|
||||
lib_LTLIBRARIES = libwget.la
|
||||
|
||||
libwget_la_SOURCES = \
|
||||
@ -27,12 +37,7 @@ libwget_la_CPPFLAGS =\
|
||||
-fPIC -I$(top_srcdir)/include/wget -I$(srcdir) -I$(top_builddir)/lib -I$(top_srcdir)/lib $(CFLAG_VISIBILITY) -DBUILDING_LIBWGET \
|
||||
$(CODE_COVERAGE_CPPFLAGS) \
|
||||
-DWGETVER_FILE=\"$(top_builddir)/include/wget/wgetver.h\"
|
||||
libwget_la_LIBADD =\
|
||||
$(LIBOBJS) libcsstokenizer.la $(GETADDRINFO_LIB) $(GETHOSTNAME_LIB) $(HOSTENT_LIB) $(INET_NTOP_LIB) $(INET_PTON_LIB) \
|
||||
$(LIBMULTITHREAD) $(LIBSOCKET) $(LIBTHREAD) $(LIB_CLOCK_GETTIME) $(LIB_CRYPTO) $(LIB_GETLOGIN) \
|
||||
$(LIB_HARD_LOCALE) $(LIB_MBRTOWC) $(LIB_NANOSLEEP) $(LIB_POLL) $(LIB_POSIX_SPAWN) $(LIB_PTHREAD_SIGMASK) \
|
||||
$(LIB_SELECT) $(LIB_SETLOCALE) $(LIB_SETLOCALE_NULL) $(LTLIBICONV) $(LTLIBINTL) $(SERVENT_LIB) @INTL_MACOSX_LIBS@ \
|
||||
$(LIBS) ../lib/libgnu.la $(CODE_COVERAGE_LIBS)
|
||||
libwget_la_LIBADD = libcsstokenizer.la $(libwget_libadd)
|
||||
|
||||
# include ABI version information
|
||||
libwget_la_LDFLAGS = -no-undefined -version-info $(LIBWGET_SO_VERSION)
|
||||
|
Reference in New Issue
Block a user