cross compiling with different toolchain type
Erik Joelsson
erik.joelsson at oracle.com
Thu Nov 14 16:27:19 UTC 2019
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
More information about the build-dev
mailing list