Chao Yan
2015-Mar-29 16:26 UTC
[LLVMdev] How to Cross Compile libcompiler_rt Static Library?
2015-03-29 3:33 GMT-05:00 Ed Schouten <ed at 80386.nl>:> I am cross-compiling compiler-rt for my specific use-case. That said, > I'm cross-compiling from x86-64 to x86-64, but for a different ABI. > This is what I use: > > > https://github.com/NuxiNL/cloudlibc/wiki/Building-runtime-libraries#user-content-compiler-rt > > -DCMAKE_CROSSCOMPILING=True > > As you can see, I'm using CMake. Works pretty well so far. Hopefully > something like this will work for you as well? >I tried "cmake ../compiler-rt -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_NATIVE_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DTARGET_TRIPLE=armv-none-linux-gnueabi -DCMAKE_CROSSCOMPILING=True". It will still build X86_64 version. I also tried "cmake ../compiler-rt -DCMAKE_C_COMPILER=/usr/local/arm-2009q3/bin/arm-none-linux-gnueabi-gcc -DCMAKE_CXX_COMPILER=/usr/local/arm-2009q3/bin/arm-none-linux-gnueabi-g++ -DLLVM_NATIVE_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DTARGET_TRIPLE=armv-none-linux-gnueabi -DCMAKE_CROSSCOMPILING=True ". the configure process generate errors: CMake Error at cmake/config-ix.cmake:111 (message): Cannot compile for x86_64: It seems that the cmake only works for X86 target? Thanks, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150329/8ff70543/attachment.html>
Daniel Dilts
2015-Mar-29 19:52 UTC
[LLVMdev] How to Cross Compile libcompiler_rt Static Library?
I asked about this same question in the past (month or three ago). It is not possible to cross compile compiler-rt on Windows. If you want to cross compile you should use the make build system, not the CMake build system. On Sun, Mar 29, 2015 at 9:26 AM, Chao Yan <yanchao2012 at gmail.com> wrote:> > 2015-03-29 3:33 GMT-05:00 Ed Schouten <ed at 80386.nl>: > >> I am cross-compiling compiler-rt for my specific use-case. That said, >> I'm cross-compiling from x86-64 to x86-64, but for a different ABI. >> This is what I use: >> >> >> https://github.com/NuxiNL/cloudlibc/wiki/Building-runtime-libraries#user-content-compiler-rt >> >> -DCMAKE_CROSSCOMPILING=True >> >> As you can see, I'm using CMake. Works pretty well so far. Hopefully >> something like this will work for you as well? >> > > I tried "cmake ../compiler-rt -DCMAKE_C_COMPILER=clang > -DCMAKE_CXX_COMPILER=clang++ -DLLVM_NATIVE_ARCH=ARM > -DLLVM_TARGETS_TO_BUILD=ARM -DTARGET_TRIPLE=armv-none-linux-gnueabi > -DCMAKE_CROSSCOMPILING=True". It will still build X86_64 version. > > I also tried "cmake ../compiler-rt > -DCMAKE_C_COMPILER=/usr/local/arm-2009q3/bin/arm-none-linux-gnueabi-gcc > -DCMAKE_CXX_COMPILER=/usr/local/arm-2009q3/bin/arm-none-linux-gnueabi-g++ > -DLLVM_NATIVE_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM > -DTARGET_TRIPLE=armv-none-linux-gnueabi -DCMAKE_CROSSCOMPILING=True > ". the configure process generate errors: > > CMake Error at cmake/config-ix.cmake:111 (message): > Cannot compile for x86_64: > > It seems that the cmake only works for X86 target? > > Thanks, > Chao > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150329/aefd0918/attachment.html>
Daniel Dilts
2015-Mar-29 20:11 UTC
[LLVMdev] How to Cross Compile libcompiler_rt Static Library?
I need to correct myself. It is possible to cross compile it on Windows, but not using the provided build systems. On Sun, Mar 29, 2015 at 12:52 PM, Daniel Dilts <diltsman at gmail.com> wrote:> I asked about this same question in the past (month or three ago). It is > not possible to cross compile compiler-rt on Windows. If you want to cross > compile you should use the make build system, not the CMake build system. > > On Sun, Mar 29, 2015 at 9:26 AM, Chao Yan <yanchao2012 at gmail.com> wrote: > >> >> 2015-03-29 3:33 GMT-05:00 Ed Schouten <ed at 80386.nl>: >> >>> I am cross-compiling compiler-rt for my specific use-case. That said, >>> I'm cross-compiling from x86-64 to x86-64, but for a different ABI. >>> This is what I use: >>> >>> >>> https://github.com/NuxiNL/cloudlibc/wiki/Building-runtime-libraries#user-content-compiler-rt >>> >>> -DCMAKE_CROSSCOMPILING=True >>> >>> As you can see, I'm using CMake. Works pretty well so far. Hopefully >>> something like this will work for you as well? >>> >> >> I tried "cmake ../compiler-rt -DCMAKE_C_COMPILER=clang >> -DCMAKE_CXX_COMPILER=clang++ -DLLVM_NATIVE_ARCH=ARM >> -DLLVM_TARGETS_TO_BUILD=ARM -DTARGET_TRIPLE=armv-none-linux-gnueabi >> -DCMAKE_CROSSCOMPILING=True". It will still build X86_64 version. >> >> I also tried "cmake ../compiler-rt >> -DCMAKE_C_COMPILER=/usr/local/arm-2009q3/bin/arm-none-linux-gnueabi-gcc >> -DCMAKE_CXX_COMPILER=/usr/local/arm-2009q3/bin/arm-none-linux-gnueabi-g++ >> -DLLVM_NATIVE_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM >> -DTARGET_TRIPLE=armv-none-linux-gnueabi -DCMAKE_CROSSCOMPILING=True >> ". the configure process generate errors: >> >> CMake Error at cmake/config-ix.cmake:111 (message): >> Cannot compile for x86_64: >> >> It seems that the cmake only works for X86 target? >> >> Thanks, >> Chao >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150329/3158f465/attachment.html>
Possibly Parallel Threads
- [LLVMdev] How to Cross Compile libcompiler_rt Static Library?
- [LLVMdev] How to Cross Compile libcompiler_rt Static Library?
- [LLVMdev] How to Cross Compile libcompiler_rt Static Library?
- [LLVMdev] Customize Standard C Library Using LLVM (to support llvm backend optimization)
- libcompiler_rt.so and libcompiler_rt.a are not being built