Simon Atanasyan
2012-Jun-20 19:59 UTC
[LLVMdev] "make install" fails in a cross-compilation mode with turned on optimization
Hi, LLVM "make install" command fails in a cross-compilation mode if optimization is turned on. In that case "install" program is executed on x86 host with "-s" option and cannot strip target platform binaries because "install" does not recognize format of these files. Running "make install" on the target platform is not a solution. In that case "install" cannot recognize format of "llvm-config-host" file. What is the correct way for cross-building LLVM/CLang with turned on optimization? Is it a known problem? -- Simon
Anton Korobeynikov
2012-Jun-21 21:31 UTC
[LLVMdev] "make install" fails in a cross-compilation mode with turned on optimization
Hi Simon,> LLVM "make install" command fails in a cross-compilation mode if > optimization is turned on. In that case "install" program is executed > on x86 host with "-s" option and cannot strip target platform binaries > because "install" does not recognize format of these files. Running > "make install" on the target platform is not a solution. In that case > "install" cannot recognize format of "llvm-config-host" file. > > What is the correct way for cross-building LLVM/CLang with turned on > optimization? Is it a known problem?I think you can build binutils which will understand plenty of file format. This way strip will work on cross-compiled stuff. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Simon Atanasyan
2012-Jun-22 19:43 UTC
[LLVMdev] "make install" fails in a cross-compilation mode with turned on optimization
On Fri, Jun 22, 2012 at 1:31 AM, Anton Korobeynikov <anton at korobeynikov.info> wrote:> I think you can build binutils which will understand plenty of file > format. This way strip will work on cross-compiled stuff.Yes, it's one of the possible workarounds. Personally I use a different approach - a wrapper for the install script which invokes an appropriate "strip" command. But I'm interesting in general solution works out-of-the-box. As far as I know if Makefiles are generated by cmake, binaries are not stripped at all. Is it a deliberate decision? If yes, I can just fix Makefile.rules to remove strip invocation and close the problem. -- Simon
Possibly Parallel Threads
- [LLVMdev] "make install" fails in a cross-compilation mode with turned on optimization
- [LLVMdev] build errors while cross compiling llvm-gcc for ARM
- [LLVMdev] build errors while cross compiling llvm-gcc for ARM
- [LLVMdev] build errors while cross compiling llvm-gcc for ARM
- [LLVMdev] build errors while cross compiling llvm-gcc for ARM