RFR 8241285(s): [jdk8u] fail to build hotspot with gcc-8.4.0 with or without COMPILER_WARNINGS_FATAL(Internet mail)

linzang(臧琳) linzang at tencent.com
Fri Mar 20 13:45:29 UTC 2020


Hi Andrew,
    Thanks for your comments!
     I agree with you. I also considered introduce  --disable-warnings-as-errors from higher version, but it seems a little complicated.  Not sure whether it is good candidate for backporting.
     
BRs,
Lin

On 2020/3/20, 7:46 PM, "Andrew Hughes" <gnu.andrew at redhat.com> wrote:

    
    
    On 19/03/2020 13:59, linzang(臧琳) wrote:
    > Dear All,
    >      Would you like to help review this tiny fix of build hotspot with gcc-8.4.0?
    >      Bug: https://bugs.openjdk.java.net/browse/JDK-8241285
    >      Webrev: http://cr.openjdk.java.net/~lzang/8241285/webrev/
    > 
    >     The fix makes gcc consider COMPILER_WARNINGS_FATAL flag, when it set to false, the warnings from gcc will not be treated as error.
    > 
    > BRs,
    > Lin
    > 
    
    I've hit the same warning failure recently too. I thought it was due to
    GCC 9, but maybe the same changes were backported to the GCC 8 series.
    It can be worked around by passing -Wno-error=stringop-overflow
    
    This doesn't really fix the underlying issue of the
    -Werror=stringop-overflow. It turns out I looked into fixing that last
    year, as it came up on Fedora builds, due to the use of additional flags:
    
    https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3696
    
    As to turning off -Werror in the manner suggested in this patch, we've
    been doing this for a long time in IcedTea:
    
    https://icedtea.classpath.org/hg/icedtea7-forest/hotspot/rev/c115e0d9e93f
    
    The problem, apart from needing to extend this patch to other platforms,
    is that COMPILER_WARNINGS_FATAL was traditionally also used by the JDK
    part of the build. So, by making HotSpot respect it, you create a
    situation where either both HotSpot & the JDK use -Werror (and the build
    fails, because the JDK build is not -Werror clean) or both have to be off.
    
    That was true in 7 anyway. In 8, I can't see any trace of
    COMPILER_WARNINGS_FATAL outside the HotSpot tree, due to the new build.
    While that solves the above problem, it also means that
    COMPILER_WARNINGS_FATAL isn't really integrated into the main build.
    
    I think we can accept this as an 8u only patch (the HotSpot build in 9+
    is completely different) if extended to the other platforms, but we also
    need to look at backporting --enable/disable-warnings-as-errors so it
    can be properly controlled across the entire build.
    
    Thanks,
    -- 
    Andrew :)
    
    Senior Free Java Software Engineer
    Red Hat, Inc. (http://www.redhat.com)
    
    PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
    Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
    
    



More information about the jdk8u-dev mailing list