Cross-compiling Panama: clang_getClangVersion detection

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri May 31 08:57:46 UTC 2019


Looks good I'll push

Maurizio

On 31/05/2019 09:24, Aleksey Shipilev wrote:
> Hi,
>
> I was trying to build aarch64 in "foreign" and ran into trouble. My CI cross-compiles with base
> system cross-compiler. Which means it can compile the binaries, but cannot execute them, including
> those configure tries to test. So, configure fails with:
>
> checking for clang_getClangVersion in -lclang... no
> configure: error: Cannot locate libclang or headers at the specified locations:
>              /home/buildbot/deps/clang-llvm/aarch64/lib
>              /home/buildbot/deps/clang-llvm/aarch64/include
>
> Configure and build passes after the hack like this:
>
> diff -r f94dd38a20f4 make/autoconf/lib-clang.m4
> --- a/make/autoconf/lib-clang.m4    Wed May 29 23:14:34 2019 +0200
> +++ b/make/autoconf/lib-clang.m4    Thu May 30 22:34:38 2019 +0200
> @@ -120,7 +120,7 @@
>
>        AC_CHECK_HEADER("clang-c/Index.h", [], [ENABLE_LIBCLANG="false"])
>        if test "x$ENABLE_LIBCLANG" = "xtrue"; then
> -      if test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
> +      if test "x$TOOLCHAIN_TYPE" = "xmicrosoft" || test "x$COMPILE_TYPE" = "xcross"; then
>            # Just trust the lib is there
>            LIBS=$LIBCLANG_LIBS
>          else
>
> If that makes sense, can you please push this into Panama somewhere?
>


More information about the panama-dev mailing list