diff options
| author | Brent Cook <bcook@openbsd.org> | 2015-11-22 17:23:21 -0600 |
|---|---|---|
| committer | Brent Cook <bcook@openbsd.org> | 2015-11-22 17:31:51 -0600 |
| commit | 9574b6c8ec0096480a2954774b95c4165df51799 (patch) | |
| tree | 751c9c9eb0f53768eb649bff22c5cd1b1e3d5759 | |
| parent | 9c5105eeb18ad0be0d04769f6622fed023df58af (diff) | |
| download | portable-9574b6c8ec0096480a2954774b95c4165df51799.tar.gz portable-9574b6c8ec0096480a2954774b95c4165df51799.tar.bz2 portable-9574b6c8ec0096480a2954774b95c4165df51799.zip | |
do not link libcompatnoopt if it is unneeded/built
from andy-js on github, fix #158
| -rw-r--r-- | crypto/Makefile.am | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/Makefile.am b/crypto/Makefile.am index f45e8e9..b7f4891 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am | |||
| @@ -13,7 +13,10 @@ EXTRA_DIST += CMakeLists.txt | |||
| 13 | EXTRA_DIST += compat/strcasecmp.c | 13 | EXTRA_DIST += compat/strcasecmp.c |
| 14 | 14 | ||
| 15 | libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined | 15 | libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined |
| 16 | libcrypto_la_LIBADD = libcompat.la libcompatnoopt.la | 16 | libcrypto_la_LIBADD = libcompat.la |
| 17 | if !HAVE_EXPLICIT_BZERO | ||
| 18 | libcrypto_la_LIBADD += libcompatnoopt.la | ||
| 19 | endif | ||
| 17 | libcrypto_la_CPPFLAGS = $(AM_CPPFLAGS) | 20 | libcrypto_la_CPPFLAGS = $(AM_CPPFLAGS) |
| 18 | libcrypto_la_CPPFLAGS += -DLIBRESSL_INTERNAL | 21 | libcrypto_la_CPPFLAGS += -DLIBRESSL_INTERNAL |
| 19 | libcrypto_la_CPPFLAGS += -DOPENSSL_NO_HW_PADLOCK | 22 | libcrypto_la_CPPFLAGS += -DOPENSSL_NO_HW_PADLOCK |
| @@ -31,13 +34,15 @@ else | |||
| 31 | libcrypto_la_CPPFLAGS += -DOPENSSLDIR=\"$(sysconfdir)/ssl\" | 34 | libcrypto_la_CPPFLAGS += -DOPENSSLDIR=\"$(sysconfdir)/ssl\" |
| 32 | endif | 35 | endif |
| 33 | 36 | ||
| 34 | noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la | 37 | noinst_LTLIBRARIES = libcompat.la |
| 35 | 38 | ||
| 36 | # compatibility functions that need to be built without optimizations | 39 | # compatibility functions that need to be built without optimizations |
| 40 | if !HAVE_EXPLICIT_BZERO | ||
| 41 | noinst_LTLIBRARIES += libcompatnoopt.la | ||
| 42 | |||
| 37 | libcompatnoopt_la_CFLAGS = -O0 | 43 | libcompatnoopt_la_CFLAGS = -O0 |
| 38 | libcompatnoopt_la_SOURCES = | 44 | libcompatnoopt_la_SOURCES = |
| 39 | 45 | ||
| 40 | if !HAVE_EXPLICIT_BZERO | ||
| 41 | if HOST_WIN | 46 | if HOST_WIN |
| 42 | libcompatnoopt_la_SOURCES += compat/explicit_bzero_win.c | 47 | libcompatnoopt_la_SOURCES += compat/explicit_bzero_win.c |
| 43 | else | 48 | else |
