RFR: 8250876: Build system preparation to macos on aarch64
David Holmes
david.holmes at oracle.com
Mon Aug 3 22:46:32 UTC 2020
On 3/08/2020 10:57 pm, Erik Joelsson wrote:
> Hello Vladimir,
>
> These changes look innocent enough to me. They aren't actually adding
> macosx-aarch64 support, they are just removing two minor (and more
> likely OS version related) hurdles from the build. You still have to
> provide the actual configuration on the configure command line as is
> shown in your example. Before we can call build system support, we would
> need configure to automatically setup those flags and add a separate
> parameter for the JNF framework. So, given that, I don't think this
> change warrants a JEP in itself.
Of course this change doesn't warrant a JEP in itself :) My point is
that until we have a JEP for the platform that is being targeted then we
shouldn't be making changes to provide support for that platform.
That said I didn't actually look at the changes but focused on the
larger stated aim, so apologies for that.
The actual changes here are small and not obviously related to
supporting macOS-Aarch64. But I'm unclear on this change as it affects
all macOS builds:
42 else ifeq ($(call isBuildOs, macosx), true)
43 ADLC_LDFLAGS := -lc++
if this was fixing a bug as indicated, why do we not see this bug in
regular builds?
Thanks,
David
-----
> My only complaint is that you revert jib-profiles.js. That file is only
> used internally at Oracle. If/when we need it to support macosx-aarch64,
> we will provide those changes.
>
> I must say I'm happy to see you managed to get a working build
> configuration with just this though!
>
> /Erik
>
> On 2020-08-01 00:24, Vladimir Kempik wrote:
>> Hello
>>
>> Please review this change for JDK-8250876
>>
>> This changeset adds support for macos/aarch64 into build system.
>> It will allow to crosscompile for macos/aarch64 using intel mac as well.
>>
>> This changeset does NOT address some arm specific issues in the macos
>> related code, we plan to do that in s separate commit.
>>
>> An example of configure to cross-compile for macos/arm64:
>>
>> --with-boot-jdk=/path/to/java/
>> --with-build-jdk=/path/to/same/java/as/compiled
>> --disable-warnings-as-errors --with-jvm-variants=zero
>> --openjdk-target=aarch64-apple-darwin --with-extra-cflags='-arch
>> arm64' --with-extra-ldflags='-arch arm64
>> -F/Path/To/Folder/Containing/JNF_framework/'
>> —with-extra-cxxflags='-arch arm64’
>>
>> JNF.framework is missing arm64 part as of next macos release, but
>> Apple has opensourced it.
>>
>> Fix to adlc were needed due to it using symbols from stdc++ and not
>> linking to it, so it fails when doing make images.
>>
>> The webrev: http://cr.openjdk.java.net/~vkempik/8250876/webrev.00/
>> The bug: https://bugs.openjdk.java.net/browse/JDK-8250876
>>
>> Testing: jdk/submit.
>>
>> Thanks, Vladimir.
More information about the build-dev
mailing list