Greetings! How to build llvm on linux such that I can get all required libraries when I specify "--target=x86_64-unknown-freebsd9.0" when running on Linux machine. I built llvm + clang + compiler-rt using CMake on Linux machine and I could run sample program using "--target=x86_64-unknown-freebsd9.0". However when I use "-fprofile-instr-generate' with "--target=x86_64-unknown-freebsd9.0" I am observing error saying -- "lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-x86_64.a: No such file or dir". Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151102/02ca980b/attachment.html>
Justin Bogner via llvm-dev
2015-Nov-02 17:47 UTC
[llvm-dev] How to build llvm for --target=freebsd
hi via llvm-dev <llvm-dev at lists.llvm.org> writes:> Greetings! > > How to build llvm on linux such that I can get all required libraries when > I specify "--target=x86_64-unknown-freebsd9.0" when running on Linux > machine. > > I built llvm + clang + compiler-rt using CMake on Linux machine and I could > run sample program using "--target=x86_64-unknown-freebsd9.0". > > However when I use "-fprofile-instr-generate' with > "--target=x86_64-unknown-freebsd9.0" I am observing error saying -- > "lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-x86_64.a: No such file or > dir".It's likely that the profile runtime was only built for your host by the cmake build. You'd need to cross compile a freebsd toolchain to make fprofile-instr-generate work, but I think that building cross compiler toolchains with cmake runs into problems currently. See also "[RFC] Strategies for Bootstrapping Compiler-RT builtins": http://lists.llvm.org/pipermail/llvm-dev/2015-November/091916.html