On Fri, 2 Apr 2021 16:21:52 GMT, Erik Joelsson <er...@openjdk.org> wrote:
>> Please review adding necessary flags for cross-compilation on macos/x86 >> targeting macos/aarch64. >> >> All CFLAGS, CXXFLAGS, LDFLAGS need target CPU flag `-arch arm64`. >> This patch adds the flag along e.g `-m64`. >> >> Tested: >> * cross-compilation on macos/x86 to macos/aarch64: configure >> --openjdk-target=aarch64-apple-darwin >> * native compilation on macos/aarch64 >> * native compilation on macos/x86 > > make/autoconf/flags.m4 line 269: > >> 267: >> 268: if test "x$OPENJDK_TARGET_OS" = xmacosx && >> 269: test "x$OPENJDK_TARGET_CPU" = xaarch64; then > > Thank you for getting on this! > For symmetry, and to enable cross compilation on both directions, can we add > the necessary flag for x64 too? > > Also, I doubt it matters much, but we could also only set these flags if > COMPILE_TYPE=cross. Thinking again, it doesn't hurt to be explicit about this. Better always set these flags to avoid surprises. ------------- PR: https://git.openjdk.java.net/jdk/pull/3325