From 7279c47f11c9e9bf17fee067d9a71ef72366d675 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 2 Aug 2018 15:05:11 +0200 Subject: [PATCH] lib/Makefile: only do symbol hiding if told to This restores the ability to build a static lib with --disable-symbol-hiding to keep non-curl_ symbols. Researched-by: Dan Fandrich Reported-by: Ran Mozes Fixes #2830 Closes #2831 --- lib/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Makefile.am b/lib/Makefile.am index 277839824d..7e82d467e9 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -107,8 +107,11 @@ endif if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers else +# if symbol-hiding is enabled, hide them! +if DOING_CURL_SYMBOL_HIDING libcurl_la_LDFLAGS_EXTRA += -export-symbols-regex '^curl_.*' endif +endif if USE_CPPFLAG_CURL_STATICLIB libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB