libressl/SUSE-extra-symver.patch
Mikhail Novosyolov 709fb483dc Init
2019-11-30 20:27:00 +03:00

66 lines
2.6 KiB
Diff

From f2969c659b4cbccbb3766f72926a9a829b17d561 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Mon, 4 Dec 2017 21:25:11 +0100
Subject: [PATCH 8/8] SUSE extra symver
Add symbol versions into the library to be on par with openssl.
---
libressl/crypto/Makefile.am | 6 +++++-
libressl/ssl/Makefile.am | 6 +++++-
libressl/tls/Makefile.am | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/libressl/crypto/Makefile.am b/libressl/crypto/Makefile.am
index f66bb73..fdb970b 100644
--- a/libressl/crypto/Makefile.am
+++ b/libressl/crypto/Makefile.am
@@ -93,7 +93,11 @@ if HOST_WIN
-mv crypto_portable.sym.tmp crypto_portable.sym
endif
-libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined -export-symbols crypto_portable.sym
+crypto2.sym: crypto_portable.sym
+ (echo 'LIBRESSL { global: '; sed -e 's/\(.*\)/\1;/' <$<; echo 'local: *; };') >$@
+
+libcrypto_la_DEPENDENCIES = crypto2.sym libcompat.la
+libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined -Wl,--version-script=crypto2.sym
libcrypto_la_LIBADD = libcompat.la
if !HAVE_EXPLICIT_BZERO
libcrypto_la_LIBADD += libcompatnoopt.la
diff --git a/libressl/ssl/Makefile.am b/libressl/ssl/Makefile.am
index 02109f5..a92c86c 100644
--- a/libressl/ssl/Makefile.am
+++ b/libressl/ssl/Makefile.am
@@ -6,7 +6,11 @@ EXTRA_DIST = VERSION
EXTRA_DIST += CMakeLists.txt
EXTRA_DIST += ssl.sym
-libssl_la_LDFLAGS = -version-info @LIBSSL_VERSION@ -no-undefined -export-symbols $(top_srcdir)/ssl/ssl.sym
+ssl2.sym: ssl.sym
+ (echo 'LIBRESSL { global: '; sed -e 's/\(.*\)/\1;/' <$<; echo 'local: *; };') >$@
+
+libssl_la_DEPENDENCIES = ssl2.sym
+libssl_la_LDFLAGS = -version-info @LIBSSL_VERSION@ -no-undefined -Wl,--version-script=ssl2.sym
libssl_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la
libssl_la_SOURCES = bio_ssl.c
diff --git a/libressl/tls/Makefile.am b/libressl/tls/Makefile.am
index 40ba156..cc03b2d 100644
--- a/libressl/tls/Makefile.am
+++ b/libressl/tls/Makefile.am
@@ -6,7 +6,11 @@ EXTRA_DIST = VERSION
EXTRA_DIST += CMakeLists.txt
EXTRA_DIST += tls.sym
-libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined -export-symbols $(top_srcdir)/tls/tls.sym
+tls2.sym: tls.sym
+ (echo 'LIBRESSL { global: '; sed -e 's/\(.*\)/\1;/' <$<; echo 'local: *; };') >$@
+
+libtls_la_DEPENDENCIES = tls2.sym
+libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined -Wl,--version-script=tls2.sym
libtls_la_LIBADD = $(abs_top_builddir)/ssl/libssl.la
libtls_la_LIBADD += $(abs_top_builddir)/crypto/libcrypto.la
libtls_la_LIBADD += $(PLATFORM_LDADD)
--
2.21.0