aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Bluhm <[email protected]>2018-04-12 00:20:17 +0200
committerAlexander Bluhm <[email protected]>2018-04-12 02:08:16 +0200
commitea9ad889a3c0f585c4f96b20c93961851d782c2e (patch)
treed2a92ba4aaa7350f81575a1b1e10dd0b3411e0d6
parent87c697920206ac7ab0f757d3ec0c5550defd2517 (diff)
Do not create shared library symlinks on OpenBSD.
Symlinks to shared libraries confuse the OpenBSD dynamic linker. We need one file with two numbers. The problem became apparent when the abi_rev and the OpenBSD ports shared libs numbers diverged. Add a new conditional variable symlink_shared_lib to suppress the symlink in the makefile.
-rwxr-xr-xconfigure.py1
-rw-r--r--src/build-data/makefile.in2
-rw-r--r--src/build-data/os/openbsd.txt2
3 files changed, 4 insertions, 1 deletions
diff --git a/configure.py b/configure.py
index 378e12c82..9fe0ff2ba 100755
--- a/configure.py
+++ b/configure.py
@@ -1852,6 +1852,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
'build_shared_lib': options.build_shared_lib,
'build_unix_shared_lib': options.build_shared_lib and options.compiler != 'msvc',
+ 'symlink_shared_lib': options.build_shared_lib and options.compiler != 'msvc' and options.os != 'openbsd',
'build_msvc_shared_lib': options.build_shared_lib and options.compiler == 'msvc',
'libobj_dir': build_paths.libobj_dir,
diff --git a/src/build-data/makefile.in b/src/build-data/makefile.in
index 2039ade4e..d3e69642d 100644
--- a/src/build-data/makefile.in
+++ b/src/build-data/makefile.in
@@ -98,6 +98,8 @@ fuzzer_corpus_zip: fuzzer_corpus
%{out_dir}/%{shared_lib_name}: $(LIBOBJS)
%{lib_link_cmd} $(LDFLAGS) $(LIBOBJS) $(LIB_LINKS_TO) %{output_to_exe}$@
+%{endif}
+%{if symlink_shared_lib}
cd %{out_dir} && ln -fs %{shared_lib_name} %{soname_base}
cd %{out_dir} && ln -fs %{shared_lib_name} %{soname_patch}
diff --git a/src/build-data/os/openbsd.txt b/src/build-data/os/openbsd.txt
index 5ba148e66..ad35da15b 100644
--- a/src/build-data/os/openbsd.txt
+++ b/src/build-data/os/openbsd.txt
@@ -1,6 +1,6 @@
soname_pattern_base "lib{libname}.so"
-soname_pattern_abi "lib{libname}.so.{abi_rev}"
+soname_pattern_abi "lib{libname}.so.{abi_rev}.{version_minor}"
soname_pattern_patch "lib{libname}.so.{abi_rev}.{version_minor}"
<target_features>