On Thu, 4 Mar 2021 19:30:27 GMT, Erik Joelsson <er...@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`
>>  - [ ] Build with target `x86_64-linux-gnu`
>>  - [x] Build with cross-target `i686-linux-gnu`
>>  - [ ] Build with cross-target `alpha-linux-gnu`
>>  - [ ] Build with cross-target `aarch64-linux-gnu`
>>  - [ ] Build with cross-target `arm-linux-gnueabihf`
>>  - [ ] Build with cross-target `arm-linux-gnueabi`
>>  - [ ] Build with cross-target `mipsel-linux-gnu`
>>  - [ ] Build with cross-target `mips64el-linux-gnuabi64`
>>  - [ ] Build with cross-target `powerpc-linux-gnu`
>>  - [ ] Build with cross-target `powerpc64-linux-gnu`
>>  - [ ] Build with cross-target `powerpc64le-linux-gnu`
>>  - [ ] Build with cross-target `m68k-linux-gnu`
>>  - [ ] Build with cross-target `sh4-linux-gnu`
>
> make/autoconf/lib-freetype.m4 line 201:
> 
>> 199:         if test "x$FOUND_FREETYPE" != "xyes" ; then
>> 200:           LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
>> 201:               
>> [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnueabihf], [well-known 
>> location])
> 
> Do we really need to explicitly list all the gnu* variants here? Isn't the 
> subdir simply the value of openjdk-target? At least it looks that way in the 
> submit.yml.

I think that value should be accessible from OPENJDK_TARGET_AUTOCONF_NAME.

-------------

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

Reply via email to