JDK 9 build with GCC 6.1.1

Kim Barrett kim.barrett at oracle.com
Mon Jun 27 23:37:59 UTC 2016


> On Jun 25, 2016, at 9:57 AM, Yasumasa Suenaga <yasuenag at gmail.com> wrote:
> 
> Hi all,
> 
> This review request relates to [1].
> 
> I've tried to build OpenJDK 9 at Fedora 24 x64.
> Fedora 24 has GCC 6.1.1, and OpenJDK 9 build was failed.
> 
> I fixed build error and several issues (VM crash and internal error) as below:
> 
>  http://cr.openjdk.java.net/~ysuenaga/jdk9-for-gcc6/hotspot/
> 
> Does someone work for it?
> If no one works for it, I will file it to JBS and will send review request.
> 
> For jdk repos, I've sent review request [2].
> 
> 
> Thanks,
> 
> Yasumasa
> 
> 
> [1] http://mail.openjdk.java.net/pipermail/jdk9-dev/2016-June/004494.html
> [2] http://mail.openjdk.java.net/pipermail/2d-dev/2016-June/007081.html

Having gone through these, I think all of them are arising due to
build system problems, where we seem to have lost the compiler
configuration to use explicit selection of the language standard and
some additional options.

For now I think we should fix the build system problems, and file
additional bugs or update existing ones as needed to fix the root
causes of the problems encountered. I think many of the proposed
changes do not address the root causes, and should not be made.  See
my comments for the specific bugs.

I'm not on the mailing list where the jdk RFR was submitted.  I took a
look at them though, and

------------------------------------------------------------------------------ 
make/lib/Awt2dLibraries.gmk
 407 # Avoid warning for GCC 6
 408 ifeq ($(TOOLCHAIN_TYPE), gcc)
 409   LCMS_CFLAGS += -Wno-misleading-indentation
 410 endif

 926     # Avoid warning for GCC 6
 927     ifeq ($(TOOLCHAIN_TYPE), gcc)
 928       BUILD_LIBSPLASHSCREEN_jdhuff.c_CFLAGS += -Wno-shift-negative-value
 929       BUILD_LIBSPLASHSCREEN_jdphuff.c_CFLAGS += -Wno-shift-negative-value
 930     endif

The -Wmisleading-indentation and -Wshift-negative-value options are
new in gcc 6. gcc has for some time (starting with gcc 4.4) silently
ignored unrecognized -Wno-XXX options. But some folks (like SAP) are
still using older versions. So these will need to be conditionalized
on the gcc version.

------------------------------------------------------------------------------
src/java.desktop/share/native/libfontmanager/layout/SunLayoutEngine.cpp
 154   if (min < 0) min = 0;
 155   if (max < min) max = min; /* defensive coding */

[splitting the line]

Seems like this would be suppressed by -Wno-misleading-indentation,
especially since the reported warning is for that.  Why change both
the code and the build configuration?

------------------------------------------------------------------------------

The changes in AlphaMath.c and splashscreen_jpeg.c look ok.



More information about the hotspot-dev mailing list