Issue metadata
Sign in to add a comment
|
compiler-rt support in CrOS toolchain |
||||||||||||||||||||||
Issue descriptionJust wondering, is there any plan to support LLVM's compiler-rt? https://compiler-rt.llvm.org/
,
Apr 5 2017
,
Apr 5 2017
Cool, thanks for the info!
,
Apr 5 2017
I just tried this on the 2017.04.03.221904 snapshot https://pantheon.corp.google.com/storage/browser/chromiumos-sdk/2017/04/ But, I'm getting some errors: /tmp/test-4dac1f.o:/usr/local/google/home/bcf/src/scratch/test.cc:function main: error: undefined reference to '_Unwind_Resume' /tmp/test-4dac1f.o(.ARM.exidx.text._ZNKSt8functionIFviEEclEi+0x0): error: undefined reference to '__aeabi_unwind_cpp_pr0' Am I missing something? % cat ~/src/scratch/test.cc [22:33 1] #include <iostream> int main() { std::cout << "hello\n"; } % ./prebuilt/toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-clang++ -std=c++11 -rtlib=compiler-rt ~/src/scratch/test.cc [22:33 0] /tmp/test-71e940.o(.ARM.exidx.text.startup+0x0): error: undefined reference to '__aeabi_unwind_cpp_pr0' /tmp/test-71e940.o(.ARM.exidx+0x0): error: undefined reference to '__aeabi_unwind_cpp_pr0' clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
,
Apr 5 2017
compiler-rt needs libunwind or libgcc_s for c++ or if asan is used. Upstream bug: https://bugs.llvm.org//show_bug.cgi?id=28681 Right now, standalone sdk does not include libunwind. We will try to add it as part of bug 705071 but may take a while. For the time being, can you try one of the following: emerge-${BOARD} libunwind clang++ --sysroot=/build/${BOARD} -rtlib=compiler-rt -lunwind ... Or For standalone sdk, Adding -lgcc_s should work but I am not sure if doing so will make clang use everything from gcc_s instead of compiler-rt. i.e. clang++ -rtlib=compiler-rt -lgcc_s
,
Feb 5 2018
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by manojgupta@chromium.org
, Apr 5 2017