RFR: JDK-8196803: Fix build warnings in jdk libraries with Xcode 9
Sergey.Bylokhov at oracle.com
Tue Feb 6 20:54:05 UTC 2018
Why XCode 9 was selected? It seems that 9.2 is the latest one.
9.2 produces some additional warnings even after this fix.
On 05/02/2018 14:54, Erik Joelsson wrote:
> When building with Xcode 9, we get some warnings triggered in jdk
> libraries. This patch tries to fix them. See bug description for more
> details on each of them. In short the following things are addressed:
> In src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m, remove
> the check on MAC_OS_X_VERSION_MAX_ALLOWED. I don't think that's
> relevant. The source needs to compile against the headers that are
> present. This was touched on earlier in this thread:
> and when going back, it's quite clear to me that the fix done there was
> In src/java.desktop/share/native/libsplashscreen/libpng/pngrutil.c, we
> can't modify the source file itself, so here I've added a wrapper for
> zlib.h that rewrites the ZLIB_VERNUM macro to a version that matches
> what's available on the Macosx version we are building for. This type of
> override can be brittle but seems to work OK in this case. While doing
> this, I also refactored the handling of libz cflags and libs. They are
> better set and exported from configure to be globally available in the
> We also get warnings when linking static libraries. These are easily
> fixed by adding the -mmacosx-version-min= arguments on these command
> lines just like we do for linking shared libraries and executables. I
> solved this by setting ARFLAGS and actually use that variable.
> Webrev: http://cr.openjdk.java.net/~erikj/8196803/webrev.01/index.html
> Bug: https://bugs.openjdk.java.net/browse/JDK-8196803
Best regards, Sergey.
More information about the build-dev