]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib/Makefile: only do symbol hiding if told to
authorDaniel Stenberg <daniel@haxx.se>
Thu, 2 Aug 2018 13:05:11 +0000 (15:05 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 3 Aug 2018 21:40:34 +0000 (23:40 +0200)
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

index 277839824d3752f3841c88569f1ef2f46a74e26c..7e82d467e99b3122f6719aec00d629eaa2ea2f81 100644 (file)
@@ -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