[8u] RFR: JDK-8269468: JDK-8269388 breaks the build on older GCCs

Severin Gehwolf sgehwolf at redhat.com
Mon Jun 28 14:19:00 UTC 2021


On Mon, 2021-06-28 at 14:36 +0100, Andrew Hughes wrote:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8269468
> Webrev: https://cr.openjdk.java.net/~andrew/openjdk8/8269468/webrev.01/

This looks fine.

> In trying to promote 8u302-b07, I found the addition of -Werror=format-overflow
> broke the build on older GCCs (specifically building on RHEL 7).
> 
> The option is fairly new, only introduced in GCC 7:
> 
> https://gcc.gnu.org/gcc-7/changes.html
> 
> Adding a version conditional similar to others in that file fixes the
> build.

OK.

Aside:

GCC 11, which I have here, prints this for -dumpversion: '11'. That is,
CC_VER_MINOR is incorrect. As this patch isn't using that variable,
it's fine. However a bug nevertheless.

$ gcc -dumpfullversion
11.1.1
$ gcc -dumpversion
11
$ CC_VER_MINOR=$(gcc -dumpversion | sed 's/egcs-//' | cut -d'.' -f2); CC_VER_MAJOR=$(gcc -dumpversion | sed 's/egcs-//' | cut -d'.' -f1); echo $CC_VER_MAJOR.$CC_VER_MINOR
11.11

Thanks,
Severin



More information about the jdk8u-dev mailing list