Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-15 Thread Magnus Ihse Bursie
On Wed, 2 Dec 2020 17:34:00 GMT, Anton Kozlov  wrote:

> 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.

Marked as reviewed by ihse (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-10 Thread Anton Kozlov
On Wed, 2 Dec 2020 19:27:25 GMT, Phil Race  wrote:

>> 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.
>
> 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

@prrace could you look at this?

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-09 Thread Roger Riggs
On Wed, 2 Dec 2020 17:34:00 GMT, Anton Kozlov  wrote:

> 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.

Looks ok to me.
But it would be good if @prrace can have a look.

-

Marked as reviewed by rriggs (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-09 Thread Magnus Ihse Bursie
On Wed, 2 Dec 2020 17:34:00 GMT, Anton Kozlov  wrote:

> 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.

>From a build PoV this sounds like a reasonable fix, but you need a review from 
>someone in core-libs as well.

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-08 Thread Anton Kozlov
On Thu, 3 Dec 2020 06:50:11 GMT, Anton Kozlov  wrote:

>> Filed https://bugs.openjdk.java.net/browse/JDK-8257633
>
> 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?

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-02 Thread Anton Kozlov
On Wed, 2 Dec 2020 22:04:17 GMT, Erik Joelsson  wrote:

>> We are indeed missing the macos-version-min argument when linking 
>> libjvm.dylib. This is a bug.
>
> Filed https://bugs.openjdk.java.net/browse/JDK-8257633

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.

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-02 Thread Erik Joelsson
On Wed, 2 Dec 2020 22:00:55 GMT, Erik Joelsson  wrote:

>> 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.

Filed https://bugs.openjdk.java.net/browse/JDK-8257633

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-02 Thread Erik Joelsson
On Wed, 2 Dec 2020 21:57:15 GMT, Erik Joelsson  wrote:

>> 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.

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-02 Thread Erik Joelsson
On Wed, 2 Dec 2020 21:32:46 GMT, Anton Kozlov  wrote:

>> I wonder if we should be "upping" that to something later.
>> 10.9 is over 7 years old and has been out of support for what - 4 years ?
>
> 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.

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-02 Thread Anton Kozlov
On Wed, 2 Dec 2020 20:19:54 GMT, Phil Race  wrote:

>> 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.
>
> I wonder if we should be "upping" that to something later.
> 10.9 is over 7 years old and has been out of support for what - 4 years ?

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

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-02 Thread Alan Snyder
> On Dec 2, 2020, at 12:22 PM, Phil Race  wrote:
> 
> On Wed, 2 Dec 2020 20:04:12 GMT, Anton Kozlov  wrote:
> 
>>> 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.
> 
> I wonder if we should be "upping" that to something later.
> 10.9 is over 7 years old and has been out of support for what - 4 years ?
> 
> -
> 
> PR: https://git.openjdk.java.net/jdk/pull/1569
> 

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.



Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-02 Thread Phil Race
On Wed, 2 Dec 2020 20:04:12 GMT, Anton Kozlov  wrote:

>> 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.

I wonder if we should be "upping" that to something later.
10.9 is over 7 years old and has been out of support for what - 4 years ?

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-02 Thread Anton Kozlov
On Wed, 2 Dec 2020 19:27:25 GMT, Phil Race  wrote:

>> 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.
>
> 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.

-

PR: https://git.openjdk.java.net/jdk/pull/1569


Re: RFR: 8257620: Do not use objc_msgSend_stret to get macOS version

2020-12-02 Thread Phil Race
On Wed, 2 Dec 2020 17:34:00 GMT, Anton Kozlov  wrote:

> 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.

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

-

PR: https://git.openjdk.java.net/jdk/pull/1569