aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2020-10-06 19:40:29 -0500
committerBrent Cook <busterb@gmail.com>2020-10-06 19:40:29 -0500
commitb9918fc1ecfa74d6d3d9a3c533603a9677108d24 (patch)
tree9b0f7db267b0c5346996ceb55e31946862db1b69
parent0ef7d54fbcc9f4e51d3f56479df8d2e24bb7c5ae (diff)
parent5a29b0472d5d0d1aa9936e430a87299fdb0f17ba (diff)
downloadportable-b9918fc1ecfa74d6d3d9a3c533603a9677108d24.tar.gz
portable-b9918fc1ecfa74d6d3d9a3c533603a9677108d24.tar.bz2
portable-b9918fc1ecfa74d6d3d9a3c533603a9677108d24.zip
Land #610, Statically link libcrypto/ssl into libtls
-rw-r--r--apps/nc/Makefile.am6
-rw-r--r--configure.ac3
-rw-r--r--crypto/Makefile.am13
-rw-r--r--libtls.pc.in3
-rw-r--r--ssl/Makefile.am9
-rw-r--r--tls/Makefile.am9
6 files changed, 34 insertions, 9 deletions
diff --git a/apps/nc/Makefile.am b/apps/nc/Makefile.am
index 4b5b561..d678f1e 100644
--- a/apps/nc/Makefile.am
+++ b/apps/nc/Makefile.am
@@ -12,9 +12,9 @@ endif
12EXTRA_DIST = nc.1 12EXTRA_DIST = nc.1
13EXTRA_DIST += CMakeLists.txt 13EXTRA_DIST += CMakeLists.txt
14 14
15nc_LDADD = $(abs_top_builddir)/crypto/libcrypto.la 15nc_LDFLAGS = $(abs_top_builddir)/crypto/.libs/libcrypto.a
16nc_LDADD += $(abs_top_builddir)/ssl/libssl.la 16
17nc_LDADD += $(abs_top_builddir)/tls/libtls.la 17nc_LDADD = $(abs_top_builddir)/tls/libtls.la
18nc_LDADD += $(PLATFORM_LDADD) $(PROG_LDADD) 18nc_LDADD += $(PLATFORM_LDADD) $(PROG_LDADD)
19 19
20AM_CPPFLAGS += -I$(top_srcdir)/apps/nc/compat 20AM_CPPFLAGS += -I$(top_srcdir)/apps/nc/compat
diff --git a/configure.ac b/configure.ac
index 75b88fe..3aca617 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,8 +29,7 @@ USER_CFLAGS="$CFLAGS"
29AC_PROG_CC([cc gcc]) 29AC_PROG_CC([cc gcc])
30AC_PROG_CC_STDC 30AC_PROG_CC_STDC
31AM_PROG_CC_C_O 31AM_PROG_CC_C_O
32AC_PROG_LIBTOOL 32LT_INIT([pic-only])
33LT_INIT
34 33
35CHECK_OS_OPTIONS 34CHECK_OS_OPTIONS
36 35
diff --git a/crypto/Makefile.am b/crypto/Makefile.am
index 7fcfc02..97a84e1 100644
--- a/crypto/Makefile.am
+++ b/crypto/Makefile.am
@@ -20,6 +20,7 @@ EXTRA_DIST += compat/strcasecmp.c
20 20
21BUILT_SOURCES = crypto_portable.sym 21BUILT_SOURCES = crypto_portable.sym
22CLEANFILES = crypto_portable.sym 22CLEANFILES = crypto_portable.sym
23CLEANFILES += libcrypto_la_objects.mk
23 24
24crypto_portable.sym: crypto.sym Makefile 25crypto_portable.sym: crypto.sym Makefile
25 -echo "generating crypto_portable.sym ..." 26 -echo "generating crypto_portable.sym ..."
@@ -93,8 +94,20 @@ if HOST_WIN
93 -mv crypto_portable.sym.tmp crypto_portable.sym 94 -mv crypto_portable.sym.tmp crypto_portable.sym
94endif 95endif
95 96
97libcrypto_la_objects.mk: Makefile
98 @echo "libcrypto_la_objects= $(libcrypto_la_OBJECTS)" \
99 | sed 's/ */ $$\(abs_top_builddir\)\/crypto\//g' \
100 > libcrypto_la_objects.mk
101 @echo "libcompat_la_objects= $(libcompat_la_OBJECTS)" \
102 | sed 's/ */ $$\(abs_top_builddir\)\/crypto\//g' \
103 >> libcrypto_la_objects.mk
104 @echo "libcompatnoopt_la_objects= $(libcompatnoopt_la_OBJECTS)" \
105 | sed 's/ */ $$\(abs_top_builddir\)\/crypto\//g' \
106 >> libcrypto_la_objects.mk
107
96libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined -export-symbols crypto_portable.sym 108libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined -export-symbols crypto_portable.sym
97EXTRA_libcrypto_la_DEPENDENCIES = crypto_portable.sym 109EXTRA_libcrypto_la_DEPENDENCIES = crypto_portable.sym
110EXTRA_libcrypto_la_DEPENDENCIES += libcrypto_la_objects.mk
98libcrypto_la_LIBADD = libcompat.la 111libcrypto_la_LIBADD = libcompat.la
99if !HAVE_EXPLICIT_BZERO 112if !HAVE_EXPLICIT_BZERO
100libcrypto_la_LIBADD += libcompatnoopt.la 113libcrypto_la_LIBADD += libcompatnoopt.la
diff --git a/libtls.pc.in b/libtls.pc.in
index 82a6a71..0d4e625 100644
--- a/libtls.pc.in
+++ b/libtls.pc.in
@@ -9,8 +9,7 @@ Name: LibreSSL-libtls
9Description: Secure communications using the TLS socket protocol. 9Description: Secure communications using the TLS socket protocol.
10Version: @VERSION@ 10Version: @VERSION@
11Requires: 11Requires:
12Requires.private: libcrypto libssl
13Conflicts: 12Conflicts:
14Libs: -L${libdir} -ltls 13Libs: -L${libdir} -ltls
15Libs.private: @LIBS@ -lcrypto -lssl @PLATFORM_LDADD@ 14Libs.private: @LIBS@ @PLATFORM_LDADD@
16Cflags: -I${includedir} 15Cflags: -I${includedir}
diff --git a/ssl/Makefile.am b/ssl/Makefile.am
index dded59f..4c4e594 100644
--- a/ssl/Makefile.am
+++ b/ssl/Makefile.am
@@ -6,6 +6,15 @@ EXTRA_DIST = VERSION
6EXTRA_DIST += CMakeLists.txt 6EXTRA_DIST += CMakeLists.txt
7EXTRA_DIST += ssl.sym 7EXTRA_DIST += ssl.sym
8 8
9CLEANFILES = libssl_la_objects.mk
10
11EXTRA_libssl_la_DEPENDENCIES = libssl_la_objects.mk
12
13libssl_la_objects.mk: Makefile
14 @echo "libssl_la_objects= $(libssl_la_OBJECTS)" \
15 | sed 's/ */ $$\(abs_top_builddir\)\/ssl\//g' \
16 > libssl_la_objects.mk
17
9libssl_la_LDFLAGS = -version-info @LIBSSL_VERSION@ -no-undefined -export-symbols $(top_srcdir)/ssl/ssl.sym 18libssl_la_LDFLAGS = -version-info @LIBSSL_VERSION@ -no-undefined -export-symbols $(top_srcdir)/ssl/ssl.sym
10libssl_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la $(PLATFORM_LDADD) 19libssl_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la $(PLATFORM_LDADD)
11 20
diff --git a/tls/Makefile.am b/tls/Makefile.am
index 942abf9..4cea3a2 100644
--- a/tls/Makefile.am
+++ b/tls/Makefile.am
@@ -1,5 +1,8 @@
1include $(top_srcdir)/Makefile.am.common 1include $(top_srcdir)/Makefile.am.common
2 2
3-include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk
4-include $(abs_top_builddir)/ssl/libssl_la_objects.mk
5
3lib_LTLIBRARIES = libtls.la 6lib_LTLIBRARIES = libtls.la
4 7
5EXTRA_DIST = VERSION 8EXTRA_DIST = VERSION
@@ -7,8 +10,10 @@ EXTRA_DIST += CMakeLists.txt
7EXTRA_DIST += tls.sym 10EXTRA_DIST += tls.sym
8 11
9libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined -export-symbols $(top_srcdir)/tls/tls.sym 12libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined -export-symbols $(top_srcdir)/tls/tls.sym
10libtls_la_LIBADD = $(abs_top_builddir)/ssl/libssl.la 13libtls_la_LIBADD = $(libcrypto_la_objects)
11libtls_la_LIBADD += $(abs_top_builddir)/crypto/libcrypto.la 14libtls_la_LIBADD += $(libcompat_la_objects)
15libtls_la_LIBADD += $(libcompatnoopt_la_objects)
16libtls_la_LIBADD += $(libssl_la_objects)
12libtls_la_LIBADD += $(PLATFORM_LDADD) 17libtls_la_LIBADD += $(PLATFORM_LDADD)
13 18
14libtls_la_CPPFLAGS = $(AM_CPPFLAGS) 19libtls_la_CPPFLAGS = $(AM_CPPFLAGS)