RFR: JDK-8201349 build broken when configured with --with-zlib=bundled on gcc 7.3
Volker Simonis
volker.simonis at gmail.com
Sun Feb 9 20:23:11 UTC 2020
I've also seen this recently but haven't managed to file a bug report yet.
If I remember correctly, I had to exclude two warnings, but that can also
be because I've experimented with different libz version.
The one proposed here is definitely required. So the change looks good to
me.
Erik Joelsson <erik.joelsson at oracle.com> schrieb am Mi., 5. Feb. 2020,
15:26:
> Looks good.
>
> /Erik
>
> On 2020-02-05 03:33, Magnus Ihse Bursie wrote:
> > From the bug report:
> >
> > "I'm seeing errors like this now:
> >
> > /ws/dev1/open/src/java.base/share/native/libzip/zlib/inflate.c:766:25:
> > error: this statement may fall through [-Werror=implicit-fallthrough=]
> > state->mode = EXLEN;
> >
> > It suspect it is related to the new gcc 7.3 devkit combined with
> > --with-zlib=bundled."
> >
> > The patch belows disables the warning. It is needed twice, since not
> > only libzip but also libjli includes the bundleed zlib code.
> >
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8201349
> > Patch inline:
> > diff --git a/make/lib/CoreLibraries.gmk b/make/lib/CoreLibraries.gmk
> > --- a/make/lib/CoreLibraries.gmk
> > +++ b/make/lib/CoreLibraries.gmk
> > @@ -144,7 +144,7 @@
> > CFLAGS := $(CFLAGS_JDKLIB) \
> > $(LIBZ_CFLAGS), \
> > CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
> > - DISABLED_WARNINGS_gcc := unused-function, \
> > + DISABLED_WARNINGS_gcc := unused-function implicit-fallthrough, \
> > LDFLAGS := $(LDFLAGS_JDKLIB) \
> > $(call SET_SHARED_LIBRARY_ORIGIN), \
> > LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \
> > @@ -210,7 +210,7 @@
> > EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
> > OPTIMIZATION := HIGH, \
> > CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
> > - DISABLED_WARNINGS_gcc := unused-function, \
> > + DISABLED_WARNINGS_gcc := unused-function implicit-fallthrough, \
> > DISABLED_WARNINGS_clang := sometimes-uninitialized
> > format-nonliteral, \
> > LDFLAGS := $(LDFLAGS_JDKLIB) \
> > $(call SET_SHARED_LIBRARY_ORIGIN), \
> >
> > /Magnus
>
More information about the build-dev
mailing list