RFR(S): 8184022: Build JDK 10 on OSX 10.12 and above

Hohensee, Paul hohensee at amazon.com
Sun Jul 9 13:26:56 UTC 2017

Please review the following change to get JDK10 to build on OSX 10.12 and above.


I’d very much appreciate a sponsor for this fix. Imo, successful JDK10 builds on all supported platforms would be sufficient testing, but please let me know what I can do to help.

Slightly revised from the RFE:

JDK-8182299<https://bugs.openjdk.java.net/browse/JDK-8182299> enabled previously disabled clang warnings and was intended to also enable builds on OSX 10 + Xcode 8. Due to a mixup, this code in jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m

  #if defined(MAC_OS_X_VERSION_10_12) && \
     / 10.12 changed `mask` to NSEventMask (unsigned long long) for x86_64 builds.
  - (NSEvent *)nextEventMatchingMask:(NSEventMask)mask
  - (NSEvent *)nextEventMatchingMask:(NSUInteger)mask
  untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:(BOOL)deqFlag {

works fine with OSX versions earlier than 10.12, but fails to compile starting with OSX 10.12 due to MAC_OSX_VERSION_MAX_ALLOWED being defined on the compile command line as 10.7.

The fix is to remove that definition, since it places an artificial upper bound on the OSX version under which JDK10 can be built. A source code search reveals no uses of MAC_OSX_VERSION_MAX_ALLOWED other than in NSApplicationAWT.m and hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp. The latter won't be affected by this change, since it checks for a version > 10.5, which is always true in JDK10.



More information about the build-dev mailing list