[commit] Build memmem with -Wno-error.

Joel Brobecker brobecker@adacore.com
Tue Aug 31 22:07:00 GMT 2010


> Thanks.  I was more concerned with the the fact that the file after
> the patch is build with -Werror, and that that particular -W flag may
> not exist in such order versions, and/or another flag is necessary to
> disable the warning in question.  One would assume not though, hence
> me being fine with this until proven otherwise.  :-)

As far as I could tell, there is some configury to avoid the use
of that flag if the compiler does not support it.

    build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith [...]"
    for w in ${build_warnings}; do
        case $w in
        -Werr*) WERROR_CFLAGS=-Werror ;;
        *) # Check that GCC accepts it
            saved_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS $w"
            AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",)
            CFLAGS="$saved_CFLAGS"
        esac
    done

?

-- 
Joel



More information about the Gdb-patches mailing list