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

svn commit: r1349314 - /subversion/trunk/configure.ac

Author: hwright
Date: Tue Jun 12 13:15:07 2012
New Revision: 1349314

URL: http://svn.apache.org/viewvc?rev=1349314&view=rev
Log:
Add a hack which prevents a trivial compiler warning for me when building with
clang.

* configure.ac:
  Filter out the '-no-cpp-precomp' flag with using clang, as it doesn't support
  it.

Modified:
    subversion/trunk/configure.ac

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1349314&r1=1349313&r2=1349314&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Tue Jun 12 13:15:07 2012
@@ -1366,6 +1366,12 @@ AC_SUBST(JAVAHL_COMPAT_TESTS_TARGET)
 
 # ==== Miscellaneous bits ====================================================
 
+# Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler
+### I think we get this flag from APR, so the fix probably belongs there
+if test "$CC" = "clang"; then
+  CPPFLAGS=`echo "$CPPFLAGS" | $SED -e 's/-no-cpp-precomp //'`
+fi
+
 dnl Since this is used only on Unix-y systems, define the path separator as '/'
 AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/',
         [Defined to be the path separator used on your local filesystem])



Re: svn commit: r1349314 - /subversion/trunk/configure.ac

Posted by Blair Zajac <bl...@orcaware.com>.
On 06/12/2012 06:15 AM, hwright@apache.org wrote:
> Author: hwright
> Date: Tue Jun 12 13:15:07 2012
> New Revision: 1349314
>
> URL: http://svn.apache.org/viewvc?rev=1349314&view=rev
> Log:
> Add a hack which prevents a trivial compiler warning for me when building with
> clang.
>
> * configure.ac:
>    Filter out the '-no-cpp-precomp' flag with using clang, as it doesn't support
>    it.
>
> Modified:
>      subversion/trunk/configure.ac
>
> Modified: subversion/trunk/configure.ac
> URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1349314&r1=1349313&r2=1349314&view=diff
> ==============================================================================
> --- subversion/trunk/configure.ac (original)
> +++ subversion/trunk/configure.ac Tue Jun 12 13:15:07 2012
> @@ -1366,6 +1366,12 @@ AC_SUBST(JAVAHL_COMPAT_TESTS_TARGET)
>
>   # ==== Miscellaneous bits ====================================================
>
> +# Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler
> +### I think we get this flag from APR, so the fix probably belongs there
> +if test "$CC" = "clang"; then
> +  CPPFLAGS=`echo "$CPPFLAGS" | $SED -e 's/-no-cpp-precomp //'`
> +fi

If CC is set to an absolute path or set to use a specific clang version, 
e.g. MacPorts' will use /opt/local/bin/clang-mp-3.1, this doesn't match. 
  Use a case statement instead.

case "$CC" in
   *clang*)
     CPPFLAGS=`echo "$CPPFLAGS" | $SED -e 's/-no-cpp-precomp //'` ;;
   *)
     ;;
esac

Blair