You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/05/13 12:06:05 UTC

svn commit: r1481772 - in /subversion/trunk: build/ac-macros/compiler.m4 configure.ac

Author: brane
Date: Mon May 13 10:06:04 2013
New Revision: 1481772

URL: http://svn.apache.org/r1481772
Log:
Second attempt at dealing with newer clang's propensity to accept, yet warn
about, unknown warning flags.

* build/ac-macros/compiler.m4 (SVN_CC_MODE_SETUP, SVN_CXX_MODE_SETUP):
   Instead of trying to use -Wno-unknown-warning-option, add the invoerse
   -Werror=unknown-warning-option to the default C(XX)FLAGS.

Modified:
    subversion/trunk/build/ac-macros/compiler.m4
    subversion/trunk/configure.ac

Modified: subversion/trunk/build/ac-macros/compiler.m4
URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/compiler.m4?rev=1481772&r1=1481771&r2=1481772&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/compiler.m4 (original)
+++ subversion/trunk/build/ac-macros/compiler.m4 Mon May 13 10:06:04 2013
@@ -66,14 +66,13 @@ AC_DEFUN([SVN_CC_MODE_SETUP],
     ])
   ])
 
-  dnl clang does not (always?) error out on unknown compiler
-  dnl options so silence the diagnostics emitted for warning options
-  SVN_CFLAGS_ADD_IFELSE([-Wno-unknown-warning-option])
-
   CMODEFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS_KEEP"
   AC_SUBST(CMODEFLAGS)
   AC_SUBST(CMAINTAINERFLAGS)
+
+  dnl Tell clang to not accept unknown warning flags
+  SVN_CFLAGS_ADD_IFELSE([-Werror=unknown-warning-option])
 ])
 
 
@@ -86,12 +85,11 @@ AC_DEFUN([SVN_CXX_MODE_SETUP],
                 dnl g++ and clang++
   SVN_CXXFLAGS_ADD_IFELSE([-std=c++98])
 
-  dnl clang++ does not (always?) error out on unknown compiler
-  dnl options so silence the diagnostics emitted for warning options
-  SVN_CXXFLAGS_ADD_IFELSE([-Wno-unknown-warning-option])
-
   CXXMODEFLAGS="$CXXFLAGS"
   CXXFLAGS="$CXXFLAGS_KEEP"
   AC_SUBST(CXXMODEFLAGS)
   AC_SUBST(CXXMAINTAINERFLAGS)
+
+  dnl Tell clang++ to not accept unknown warning flags
+  SVN_CXXFLAGS_ADD_IFELSE([-Werror=unknown-warning-option])
 ])

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1481772&r1=1481771&r2=1481772&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Mon May 13 10:06:04 2013
@@ -1117,6 +1117,13 @@ elif test "$enable_optimization" = "no";
 #   # do nothing
 fi
 
+dnl Dump the current compiler options
+AC_MSG_NOTICE([C compiler flags: $CFLAGS])
+AC_MSG_NOTICE([    user-defined: $CUSERFLAGS])
+AC_MSG_NOTICE([  maintaner-mode: $CMAINTAINERFLAGS])
+AC_MSG_NOTICE([C++ compiler flags: $CXXFLAGS])
+AC_MSG_NOTICE([      user-defined: $CXXUSERFLAGS])
+AC_MSG_NOTICE([    maintaner-mode: $CXXMAINTAINERFLAGS])
 
 AC_ARG_ENABLE(full-version-match,
 AS_HELP_STRING([--disable-full-version-match],



Re: svn commit: r1481772 - in /subversion/trunk: build/ac-macros/compiler.m4 configure.ac

Posted by Julian Foad <ju...@btopenworld.com>.
Branko Čibej wrote:

> On 13.05.2013 12:06, brane@apache.org wrote:
>>  URL: http://svn.apache.org/r1481772
>>  Log:
>>  Second attempt at dealing with newer clang's propensity to accept, yet 
>> warn  about, unknown warning flags.
> 
> I hope this fixes the compilation problems we've seen. I tested with
> clang 3.2 and gcc, but it should, according docs etc., work with any
> clang >=3.0.

I confirm that this patch improves the GCC experience for me.  Before this, the build was adding '-Wno-unknown-warning-option' to the GCC invocation, and GCC complained about that being an unrecognized option; after this, the build no longer adds that option.

When I use clang (version 3.0-6ubuntu3), the build adds '-Werror=unknown-warning-option', and that works fine too.

- Julian

> If no-one reports any problems, I'll add this revision to the existing
> backport proposal for 1.8.1.

Re: svn commit: r1481772 - in /subversion/trunk: build/ac-macros/compiler.m4 configure.ac

Posted by Branko Čibej <br...@wandisco.com>.
On 13.05.2013 12:06, brane@apache.org wrote:
> Author: brane
> Date: Mon May 13 10:06:04 2013
> New Revision: 1481772
>
> URL: http://svn.apache.org/r1481772
> Log:
> Second attempt at dealing with newer clang's propensity to accept, yet warn
> about, unknown warning flags.

I hope this fixes the compilation problems we've seen. I tested with
clang 3.2 and gcc, but it should, according docs etc., work with any
clang >=3.0.

If no-one reports any problems, I'll add this revision to the existing
backport proposal for 1.8.1.

-- Brane

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com