Commit b2dcf034 authored by Kamil Dudka's avatar Kamil Dudka
Browse files

curl-compilers.m4: improve detection of GCC's -fvisibility= flag

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.
parent 5f2e3b88
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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:

+2 −2
Original line number Diff line number Diff line
@@ -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"