RFR: 8257913: Add more known library locations to simplify Linux cross-compilation [v3]
Magnus Ihse Bursie
ihse at openjdk.java.net
Mon Mar 8 16:14:09 UTC 2021
On Fri, 5 Mar 2021 16:03:18 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Current cross-compilation configurations require adding the whole lot of configure options to make it find the dependencies: freetype and X11 libs are the only problematic dependencies. We should be able to specify just the `--with-sysroot`, and get everything else autodetected.
>>
>> After this patch, doing `sh ./configure --openjdk-target=powerpc64le-linux-gnu --with-sysroot=/chroots/ppc64el`, where chroot is `debootstrap`-ed chroot as per our build docs, is enough to get everything configured. See the GH Actions definition to see what options are not needed anymore.
>>
>> Some explanations:
>> - `*-gnuabi64` is needed for `mips64el`
>> - `*-gnueabihf` is needed for `armhf`
>> - `$OPENJDK_TARGET_CPU_AUTOCONF-linux-gnu` is needed for `powerpc*`, because OpenJDK build rewrites `VAR_CPU` to `ppc`, leading to mismatch.
>>
>> Additional testing:
>> - [x] Configure with target `x86_64-linux-gnu`
>> - [x] Configure with cross-target `i686-linux-gnu`
>> - [x] Configure with cross-target `alpha-linux-gnu`
>> - [x] Configure with cross-target `aarch64-linux-gnu`
>> - [x] Configure with cross-target `arm-linux-gnueabihf`
>> - [x] Configure with cross-target `arm-linux-gnueabi`
>> - [x] Configure with cross-target `mipsel-linux-gnu`
>> - [x] Configure with cross-target `mips64el-linux-gnuabi64`
>> - [x] Configure with cross-target `powerpc-linux-gnu`
>> - [x] Configure with cross-target `powerpc64-linux-gnu`
>> - [x] Configure with cross-target `powerpc64le-linux-gnu`
>> - [x] Configure with cross-target `m68k-linux-gnu`
>> - [x] Configure with cross-target `sh4-linux-gnu`
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Replace with linux with TARGET_OS
make/autoconf/platform.m4 line 364:
> 362: AC_SUBST(OPENJDK_TARGET_CPU_AUTOCONF)
> 363: AC_SUBST(OPENJDK_TARGET_LIBC)
> 364: AC_SUBST(OPENJDK_TARGET_ABI)
I realize this has already been integrated, but I don't fully understand this. There is no corresponding change in spec.gmk.in adding OPENJDK_TARGET/BUILD_CPU_AUTOCONF and OPENJDK_TARGET/BUILD_ABI.
So why the AC_SUBST()?
-------------
PR: https://git.openjdk.java.net/jdk/pull/2833
More information about the build-dev
mailing list