aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data
diff options
context:
space:
mode:
Diffstat (limited to 'src/build-data')
-rw-r--r--src/build-data/cc/clang.txt6
-rw-r--r--src/build-data/makefile/gmake_dso.in3
-rw-r--r--src/build-data/makefile/header.in1
3 files changed, 8 insertions, 2 deletions
diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt
index cfeb8087b..2585190c4 100644
--- a/src/build-data/cc/clang.txt
+++ b/src/build-data/cc/clang.txt
@@ -27,8 +27,8 @@ visibility_attribute '__attribute__((visibility("default")))'
makefile_style gmake
<so_link_commands>
-darwin -> "$(CXX) -dynamiclib -fPIC -install_name $(LIBDIR)/$(SONAME_ABI)"
-darwin-debug -> "$(CXX) -dynamiclib -fPIC -install_name $(LIBDIR)/$(SONAME_ABI)"
+darwin -> "$(CXX) -dynamiclib -fPIC -install_name $(INSTALLED_LIB_DIR)/$(SONAME_ABI) -current_version $(DARWIN_CURRENT_VER) -compatibility_version $(DARWIN_COMPATIBILITY_VER)"
+darwin-debug -> "$(CXX) -dynamiclib -fPIC -install_name $(INSTALLED_LIB_DIR)/$(SONAME_ABI) -current_version $(DARWIN_CURRENT_VER) -compatibility_version $(DARWIN_COMPATIBILITY_VER)"
# The default works for GNU ld and several other Unix linkers
default -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME_ABI)"
@@ -36,6 +36,8 @@ default-debug -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME_ABI)"
</so_link_commands>
<binary_link_commands>
+darwin -> "$(LINKER) -headerpad_max_install_names"
+darwin-debug -> "$(LINKER) -headerpad_max_install_names"
linux -> "$(LINKER) -Wl,-rpath=\$$ORIGIN"
linux-debug -> "$(LINKER) -Wl,-rpath=\$$ORIGIN"
default -> "$(LINKER)"
diff --git a/src/build-data/makefile/gmake_dso.in b/src/build-data/makefile/gmake_dso.in
index fa167b780..13f7b0a3b 100644
--- a/src/build-data/makefile/gmake_dso.in
+++ b/src/build-data/makefile/gmake_dso.in
@@ -2,6 +2,9 @@ SONAME_PATCH = %{soname_patch}
SONAME_ABI = %{soname_abi}
SONAME_BASE = %{soname_base}
+DARWIN_COMPATIBILITY_VER = %{version_packed}.%{so_abi_rev}.0
+DARWIN_CURRENT_VER = %{version_packed}.%{so_abi_rev}.%{version_patch}
+
SHARED_LIB = %{out_dir}/$(SONAME_PATCH)
$(SHARED_LIB): $(LIBOBJS)
diff --git a/src/build-data/makefile/header.in b/src/build-data/makefile/header.in
index 6e432440c..f62f5ea0d 100644
--- a/src/build-data/makefile/header.in
+++ b/src/build-data/makefile/header.in
@@ -19,6 +19,7 @@ CLI_FLAGS = $(CXXFLAGS) $(WARN_FLAGS)
TEST_FLAGS = $(CXXFLAGS) $(WARN_FLAGS)
SCRIPTS_DIR = %{scripts_dir}
+INSTALLED_LIB_DIR = %{destdir}/%{libdir}
CLI_POST_LINK_CMD = %{cli_post_link_cmd}
TEST_POST_LINK_CMD = %{test_post_link_cmd}