summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2017-07-08 17:44:34 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2017-07-10 10:16:29 +0200
commitdeadb2348f40e7afa46a03a918f522c67145ebe0 (patch)
treed88c8249b2d02d823ab381fc4caa29acf07a5a9b
parentaf0216251b94e751baa47146ac9609db70793b8e (diff)
downloadcurl-deadb2348f40e7afa46a03a918f522c67145ebe0.tar.gz
curl-compilers.m4: disable warning spam with Cygwin's clang
When building with Cygwin or MinGW, libtool uses a wrapper executable instead of a wrapper script [1], which is written in C and throws missing-variable-declarations warnings. Don't enable these warnings on Cygwin and MinGW in order to avoid warnings for every executable built, which spams the test suite output when using Cygwin's clang. [1] https://www.gnu.org/software/libtool/manual/html_node/Wrapper-executables.html Closes https://github.com/curl/curl/pull/1665
-rw-r--r--m4/curl-compilers.m410
1 files changed, 9 insertions, 1 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index dcd96ed54..3c87efa09 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -903,7 +903,15 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
#
dnl Only clang 3.2 or later
if test "$compiler_num" -ge "302"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wmissing-variable-declarations"
+ case $host_os in
+ cygwin* | mingw*)
+ dnl skip missing-variable-declarations warnings for cygwin and
+ dnl mingw because the libtool wrapper executable causes them
+ ;;
+ *)
+ tmp_CFLAGS="$tmp_CFLAGS -Wmissing-variable-declarations"
+ ;;
+ esac
fi
#
dnl Only clang 3.6 or later