-
Bug
-
Resolution: Fixed
-
P4
-
None
The backport to 11u of JDK-8210988 contains a number of issues, the most serious of which is that all warnings are dropped from builds with gcc.
Flags passed to gcc beforeJDK-8210988 include '-DLINUX -Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wformat=2 -Wunused-value -Woverloaded-virtual -Wreturn-type -fPIC'
The same section now reads '-DLINUX -fPIC'
This is because the section that defines WARNINGS_ENABLE_ALL, WARNINGS_ENABLE_ADDITIONAL_JVM and DISABLED_WARNINGS for gcc was skipped, but the change to WARNING_CFLAGS_JDK and WARNING_CFLAGS_JVM was made, essentially setting them to the empty string.
There are also a few minor issues where the different flags in 11u have not been taken into account. clang gains '-Wreorder' in the move from WARNING_CFLAGS_JVM to WARNINGS_ENABLE_ADDITIONAL_JVM:
- WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-deprecated"
+ WARNINGS_ENABLE_ADDITIONAL_JVM="-Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Woverloaded-virtual -Wreorder"
compared to 12u:
- WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wunused-value -Woverloaded-virtual -Wreorder"
+ WARNINGS_ENABLE_ADDITIONAL_JVM="-Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Woverloaded-virtual -Wreorder"
TOOLCHAIN_CFLAGS_JDK_CONLY gains a -xc99=%none:
- TOOLCHAIN_CFLAGS_JDK_CONLY="-xCC -Xa -v -W0,-noglobal" # C only
+ TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
compared to
- TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -v -W0,-noglobal" # C only
+ TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
in the 12u version.
Flags passed to gcc before
The same section now reads '-DLINUX -fPIC'
This is because the section that defines WARNINGS_ENABLE_ALL, WARNINGS_ENABLE_ADDITIONAL_JVM and DISABLED_WARNINGS for gcc was skipped, but the change to WARNING_CFLAGS_JDK and WARNING_CFLAGS_JVM was made, essentially setting them to the empty string.
There are also a few minor issues where the different flags in 11u have not been taken into account. clang gains '-Wreorder' in the move from WARNING_CFLAGS_JVM to WARNINGS_ENABLE_ADDITIONAL_JVM:
- WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-deprecated"
+ WARNINGS_ENABLE_ADDITIONAL_JVM="-Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Woverloaded-virtual -Wreorder"
compared to 12u:
- WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wunused-value -Woverloaded-virtual -Wreorder"
+ WARNINGS_ENABLE_ADDITIONAL_JVM="-Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Woverloaded-virtual -Wreorder"
TOOLCHAIN_CFLAGS_JDK_CONLY gains a -xc99=%none:
- TOOLCHAIN_CFLAGS_JDK_CONLY="-xCC -Xa -v -W0,-noglobal" # C only
+ TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
compared to
- TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -v -W0,-noglobal" # C only
+ TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
in the 12u version.
- relates to
-
JDK-8329226 Improved handling of compiler warnings in the build
- Resolved
- links to
-
Commit(master) openjdk/jdk11u-dev/c99638d3
-
Review(master) openjdk/jdk11u-dev/2838