summaryrefslogtreecommitdiff
path: root/m4/curl-compilers.m4
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2016-06-21 12:40:26 +0200
committerKamil Dudka <kdudka@redhat.com>2016-06-21 12:58:24 +0200
commitb2dcf0347f1ee5041cccd64632bb8dd7ccbbae91 (patch)
treedd7baf721f4cf38c09bf377a1154e004ba28f3e7 /m4/curl-compilers.m4
parent5f2e3b886759e0822ff31c36ef10ca8df59fcf59 (diff)
downloadcurl-b2dcf0347f1ee5041cccd64632bb8dd7ccbbae91.tar.gz
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.
Diffstat (limited to 'm4/curl-compilers.m4')
-rw-r--r--m4/curl-compilers.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 085c6ff64..6ecd3237b 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -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"