1From e8ba4d6fd11ce795d9ed7b7a2c0ee0f6bf50f352 Mon Sep 17 00:00:00 2001 2From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 3Date: Sat, 23 Jul 2022 18:20:00 +0200 4Subject: [PATCH] lib*/Makefile.am: remove -static from LDFLAGS 5 6The libbloom, libcork and libipset libraries are "convenience 7libraries" in libtool speak, and their code ends up being used in a 8shared library, so building them with -static does not work as it 9causes the code to be built without fPIC. 10 11https://www.gnu.org/software/libtool/manual/html_node/Static-libraries.html 12explains: 13 14""" 15If you omit both -rpath and -static, libtool will create a convenience 16library that can be used to create other libtool libraries, even 17shared ones. Just like in the static case, the library behaves as an 18alias to a set of object files and dependency libraries, but in this 19case the object files are suitable for inclusion in shared libraries. 20""" 21 22Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 23--- 24 libbloom/Makefile.am | 2 -- 25 libcork/Makefile.am | 2 -- 26 libipset/Makefile.am | 2 -- 27 3 files changed, 6 deletions(-) 28 29diff --git a/libbloom/Makefile.am b/libbloom/Makefile.am 30index 17c0761..6b2eddd 100644 31--- a/libbloom/Makefile.am 32+++ b/libbloom/Makefile.am 33@@ -2,5 +2,3 @@ noinst_LTLIBRARIES = libbloom.la 34 35 libbloom_la_SOURCES = bloom.c murmur2/MurmurHash2.c 36 libbloom_la_CFLAGS = -I$(top_srcdir)/libbloom -I$(top_srcdir)/libbloom/murmur2 37- 38-libbloom_la_LDFLAGS = -static 39diff --git a/libcork/Makefile.am b/libcork/Makefile.am 40index 82ce062..e466a68 100644 41--- a/libcork/Makefile.am 42+++ b/libcork/Makefile.am 43@@ -17,5 +17,3 @@ endif 44 45 libcork_la_SOURCES = $(cli_src) $(core_src) $(ds_src) $(pthreads_src) $(posix_src) 46 libcork_la_CFLAGS = -I$(top_srcdir)/libcork/include -DCORK_API=CORK_LOCAL 47- 48-libcork_la_LDFLAGS = -static 49diff --git a/libipset/Makefile.am b/libipset/Makefile.am 50index 3edfde6..bee8493 100644 51--- a/libipset/Makefile.am 52+++ b/libipset/Makefile.am 53@@ -23,5 +23,3 @@ set_src = src/libipset/set/allocation.c \ 54 55 libipset_la_SOURCES = src/libipset/general.c ${bdd_src} ${map_src} ${set_src} 56 libipset_la_CFLAGS = -I$(top_srcdir)/libipset/include -I$(top_srcdir)/libcork/include 57- 58-libipset_la_LDFLAGS = -static 59-- 602.37.1 61 62