[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-build-dev
Subject:    Re: cross compiling with different toolchain type
From:       Erik Joelsson <erik.joelsson () oracle ! com>
Date:       2019-11-14 16:27:19
Message-ID: 803e14e0-c98e-8d0d-6411-8f1dee53daff () oracle ! com
[Download RAW message or body]

Hello Johan,

You are correct, this limitation is still present. There is no good 
reason for this other than we never having needed to put effort into 
fixing it.

It could help if you build a native JDK first and then configure your 
cross build with --with-build-jdk= pointing to your native JDK, but I 
suspect this particular configure check will still fail.

/Erik

On 2019-11-14 00:50, Johan Vos wrote:
> Hi,
>
> I just want to make sure there is still a limitation in place where the
> toolchain type of a cross compiler must equal the toolchain type of the
> build compiler?
> I'm configuring a build for Android (aarch64-linux) and I am using the
> clang toolchain type for doing the cross compilation, while I'm using gcc
> as the build compiler. However, I get errors running configure:
>
> configure: The BuildC compiler (located as /usr/bin/cc) does not seem to be
> the required clang compiler.
>
> Looking into toolchain.m4, this sounds fair to me, as the BuildC compiler
> (line 916 and below) is also tested
> with TOOLCHAIN_EXTRACT_COMPILER_VERSION(BUILD_CC, [BuildC]) which
> unconditionally checks for the $TOOLCHAIN_TYPE.
>
> Hence, it seems cross-compiling using a clang compiler, while using gcc as
> the build compiler is not possible.
> That's by no means a showstopper to me, I just want to double check that
> I'm not missing something.
>
> Thanks,
>
> - Johan
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic