]> granicus.if.org Git - curl/commitdiff
curl-compilers.m4: improve detection of GCC's -fvisibility= flag
authorKamil Dudka <kdudka@redhat.com>
Tue, 21 Jun 2016 10:40:26 +0000 (12:40 +0200)
committerKamil Dudka <kdudka@redhat.com>
Tue, 21 Jun 2016 10:58:24 +0000 (12:58 +0200)
Some builds of GCC produce output on both stdout and stderr when --help
--verbose is used.  The 2>&1 redirection caused them to be arbitrarily
interleaved with each other because of stream buffering.  Consequently,
grep failed to match the fvisibility= string in the mixed output, even
though the string was present in GCC's standard output.

This led to silently disabling symbol hiding in some builds of curl.

RELEASE-NOTES
m4/curl-compilers.m4

index da5086630b9f349d89a54cdc60690d0c26ecaf31..172a599b672115815b08b8c05f5c757e36771aaa 100644 (file)
@@ -25,6 +25,7 @@ This release includes the following bugfixes:
  o http: Fix HTTP/2 connection reuse [regression] [12]
  o checksrc: Add LoadLibrary to the banned functions list
  o schannel: Disable ALPN on Windows < 8.1 [13]
+ o configure: occasional ignorance of --enable-symbol-hiding with GCC
 
 This release includes the following known bugs:
 
index 085c6ff645ccba0d2e33b4d5aed79f86ef6117f5..6ecd3237b31936989c40a6f460d84bda73acdba6 100644 (file)
@@ -21,7 +21,7 @@
 #***************************************************************************
 
 # File version for 'aclocal' use. Keep it a single number.
-# serial 66
+# serial 67
 
 
 dnl CURL_CHECK_COMPILER
@@ -1374,7 +1374,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
     GNU_C)
       dnl Only gcc 3.4 or later
       if test "$compiler_num" -ge "304"; then
-        if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
+        if $CC --help --verbose 2>/dev/null | grep fvisibility= >/dev/null ; then
           tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
           tmp_CFLAGS="-fvisibility=hidden"
           supports_symbol_hiding="yes"