Looks good to me.
/Erik
On 2015-03-12 16:04, Magnus Ihse Bursie wrote:
With JDK-8074096, some warnings produced by libunpack was silenced.
However, it turned out that the version of clang shipped with Xcode
5.1 has some weird behavior, which I would classify as a compiler bug.
The generated output differs markedly, if -Wno-foo is present on the
command line. Enough to trigger a failure in an Oracle-internal test
of libunpack.
Removing the disabled warnings restore the previous behaviour.
While I've spent too much time on this already, I have not been able
to pinpoint exactly what triggers this behavior. It seems that all
files in libunpack are affected, but no other libs. (However there are
also some minor changes in ./java.desktop/libawt_lwawt/OGLPaints.o
./java.desktop/liblcms/cmsps2.o
./java.desktop/libmlib_image/mlib_ImageColorTrue2Index.o which there
really should not be.) And it only affects libunpack, not the
unpack200 exe which shares part of the code. I have no explanation for
this.
The simple solution at this point is to back out the warning changes
for clang. There is already a fix on the way to resolve the root cause
of this failures. (And yes, I tried running that patch. It did indeed
remove the warnings. But when running with the -Wno-foo flags, clang
*still* generated broken code.)
Bug: https://bugs.openjdk.java.net/browse/JDK-8074796
Patch inline:
diff --git a/make/lib/Lib-jdk.pack200.gmk b/make/lib/Lib-jdk.pack200.gmk
--- a/make/lib/Lib-jdk.pack200.gmk
+++ b/make/lib/Lib-jdk.pack200.gmk
@@ -42,7 +42,6 @@
CFLAGS_release := -DPRODUCT, \
DISABLED_WARNINGS_gcc := conversion-null sign-compare
format-security \
format-nonliteral parentheses, \
- DISABLED_WARNINGS_clang := bool-conversion format-security, \
DISABLED_WARNINGS_solstudio := truncwarn, \
DISABLED_WARNINGS_microsoft := 4267 4018, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
/Magnus