-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8257620: Do not use objc_msgSend_stret to get macOS version #1569
Conversation
👋 Welcome back akozlov! A progress list of the required criteria for merging this PR into |
@AntonKozlov The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
e549569
to
2918b25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely these days you can just call [NSProcessInfo operatingSystemVersion] directly ?
If I read the doc below it is in the 10.10 SDK and later.
https://developer.apple.com/documentation/foundation/nsprocessinfo/1410906-operatingsystemversion?language=occ
Unfortunately, no. AFAIK, the minimum target version is 10.9 https://github.com/openjdk/jdk/blob/master/make/autoconf/flags.m4#L133, so I had to keep indirection. |
/label add build |
@prrace |
I wonder if we should be "upping" that to something later. |
Mailing list message from Alan Snyder on core-libs-dev: I know people running 10.10 and I try to keep my Java code running on 10.10, so I would suggest that. However, my experience is that JDK 14 and later refuse to run on 10.10. The metadata is conflicting: The Info.plist has JVMMinimumSystemVersion 10.6.0 libjli.dylib has LC_VERSION_MIN_MACOSX 10.9 However, libjvm has LC_VERSION_MIN_MACOSX 10.13, and that is enough to prevent it from running. |
Interesting, I still able to run the build after this change on macOS 10.9.5. I use jdk image and there is no LC_VERSION_MIN_MACOSX in libjvm. libjli, libjava have one, and it's 10.9 |
The current intention is to be consistent with the min system version and it's currently set to 10.9. If libjvm.dylib gets a different value, then that would be a bug, but note that this could also vary depending on how the build is configured and the compiler version used. So far, I have only bumped this version once, and that was because the toolchain required it when switching to Clang from GCC. Keeping it low is nice for backwards compatibility. That said, I don't see a problem with increasing this value to 10.10 if it's needed for something. Even 10.10 was EOL a long time ago now. The current value is set in make/autoconf/flags.m4. The discrepancy in Info.plist was fixed in JDK-8252145. |
We are indeed missing the macos-version-min argument when linking libjvm.dylib. This is a bug. |
Thanks for taking care of those issues. To be clear, there is no real need to bump the version for this PR, 10.9 is fine. This PR just proposes another way to implement the workaround for 10.9. |
Hi, could I get review of the patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a build PoV this sounds like a reasonable fix, but you need a review from someone in core-libs as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me.
But it would be good if @prrace can have a look.
@AntonKozlov This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 278 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@prrace, @magicus, @RogerRiggs) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@prrace could you look at this? |
/integrate |
@AntonKozlov |
@VladimirKempik @AntonKozlov Since your change was applied there have been 351 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit d4c7db5. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review a small change that replaces use of objc_msgSend_stret in macOS platform code with pure ObjC code. It's also a prerequisite for macOS/AArch64 support, where objc_msgSend_stret is not available.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1569/head:pull/1569
$ git checkout pull/1569