[cfe-dev] How to compile Clang for ARM Linux on x86_64 Linux?
Anton Smirnov
dev at antonsmirnov.name
Sun Sep 29 03:48:43 PDT 2013
Not sure it is the reason - according to output clang and clang++
(symlinked to clang) is identified:
-- The C compiler identification is Clang 3.4.0
-- The CXX compiler identification is Clang 3.4.0
-- Check for working C compiler: /home/asmirnov/llvm_installed/bin/clang
-- Check for working C compiler: /home/asmirnov/llvm_installed/bin/clang --
works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /home/asmirnov/llvm_installed/bin/clang++
-- Check for working CXX compiler:
/home/asmirnov/llvm_installed/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for C++ include cxxabi.h
-- Looking for C++ include cxxabi.h - found
I have tried with -DCMAKE_C_COMPILER and -DCMAKE_CXX_COMPILER vars - the
same error.
2013/9/29 Anton Korobeynikov <anton at korobeynikov.info>
> > It looks like it didn't find clang++, but it did find clang, so maybe you
> > need the symlink from clang++ to clang there to make it work. It should
> be
> > there, no idea why it's not.
> >
> > arm-linux-gnueabihf-g++ will not be able to compile a simple test program
> > because CMake will try to execute it and it won't run (it's ARM).
> cmake seems does not honor CC / CXX env. variables. The "hard way" to
> specify C/C++ compiler there is via -DCMAKE_C_COMPILER=clang
> -DCMAKE_CXX_COMPILER=clang++
>
> Also, I remember that some versions of cmake had bug, where it used
> clang as C compiler and something else as C++ compiler. Something like
> http://www.cmake.org/Bug/view.php?id=13505
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130929/57194615/attachment.html>
More information about the cfe-dev
mailing list