summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-06-20 18:48:27 +0200
committerJay Berkenbilt <ejb@ql.org>2012-06-20 21:18:12 +0200
commit92c94e7df230dd86eb46e8edf8e9d92531d5f6ef (patch)
treec64e1c979f910884bddd47d42cf9a7913cb56cc4 /make
parent81fc594342925137b55b3decb4992b283a52967f (diff)
downloadqpdf-92c94e7df230dd86eb46e8edf8e9d92531d5f6ef.tar.zst
Add symbol versioning
For ELF systems, turn on versioned symbols by default, and add a configure option to enable or disable them.
Diffstat (limited to 'make')
-rw-r--r--make/libtool.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/make/libtool.mk b/make/libtool.mk
index 8cd94325..e23ed246 100644
--- a/make/libtool.mk
+++ b/make/libtool.mk
@@ -18,6 +18,12 @@ endef
# --- Private definitions ---
+ifeq ($(HAVE_LD_VERSION_SCRIPT), 1)
+LD_VERSION_FLAGS=-Wl,--version-script=libqpdf.map
+else
+LD_VERSION_FLAGS=
+endif
+
# Usage: $(call libdepflags,$(basename obj))
# Usage: $(call fixdeps,$(basename obj))
ifeq ($(GENDEPS),1)
@@ -83,7 +89,8 @@ endef
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
define makelib
$(LIBTOOL) --mode=link \
- $(CXX) $(CXXFLAGS) -o $(2) $(1) $(3) $(4) \
+ $(CXX) $(CXXFLAGS) $(LD_VERSION_FLAGS) \
+ -o $(2) $(1) $(3) $(4) \
-rpath $(libdir) -version-info $(5):$(6):$(7)
endef