[llvm-dev] Building an LLVM/CLANG cross compiler for legacy GCC toolchain
Simon Atanasyan via llvm-dev
llvm-dev at lists.llvm.org
Thu Apr 12 04:27:08 PDT 2018
Hello,
On Wed, Apr 11, 2018 at 10:41 PM, Michael Dalpee via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I need to build a CLANG cross compiler for mips-linux-uclibc. To be
> completely compatible with the target system, I would like it to use linux
> 2.6.32.54 headers, binutils 2.25, gcc 4.1.2, and uClibc 0.9.30.1 for the gcc
> toolchain. I have been able to build the GCC toolchain a variety of
> different ways, but none of these builds can be "dropped in" via clang as a
> replacement for just using the gcc toolchain directly. I am building the
> toolchain on ubuntu 14.04 using gcc 4.8.4.
The "MTI GNU/Linux Toolchain" [1] includes uclibc library support and
its directories hierarchy recognized by the Clang compiler. For example,
the following command produces an executable file linked with uclibc:
clang -target mips-linux-mti-gnu -gcc-toolchain ~/2017.10-05 -muclibc main.c
You might use this toolchain as a reference.
[1] https://codescape.mips.com/components/toolchain/2017.10-05/downloads.html
--
Simon Atanasyan
More information about the llvm-dev
mailing list