[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Trunk build broken: Re: svn commit: r34258 - trunk

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 19 Nov 2008 23:28:18 -0800

Thanks, Jens, this helped me come up with a short pattern for flag
availability detection, which I've now committed in r34280.

On Wed, Nov 19, 2008 at 05:27, Jens Seidel <jensseidel_at_users.sf.net> wrote:
> On Tue, Nov 18, 2008 at 10:19:11PM -0800, Greg Stein wrote:
>> Okay. Seems like I'll need to add some extra work to detect versions
>> of GCC and add different flags based on that. I'll scrounge around the
>> autoconf pages to see if there is an easy mechanism for that.
>
> I had this problem in the past too and tried to parse g++ --version. This
> failed on various distributions because of vendor strings (e.g. Debian)
> in the output.
>
> I solved it by using:
> if test x$GXX = xyes; then
> AC_LANG_PUSH(C++)
> # Use -Wextra or the older -W ?
> CXXFLAGSold="$CXXFLAGS"
> CXXFLAGS="-Wextra $CXXFLAGS"
> AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],,
> [CXXFLAGS="-W $CXXFLAGSold"
> AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],,CXXFLAGS="$CXXFLAGSold")])
> fi
>
> So I just tested whether an empty file can be compiled and changed the compiler
> flags if not.
>
> Jens
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-20 08:28:31 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.