[LLVMdev] Error cross building for the Power PC

Richard Pennington rich at pennware.com
Sun May 11 03:51:29 PDT 2014


Hi,

I build clang/LLVM using libcxx, libcxxabi, musl (C standard library), 
and compiiler-rt. As sort of a sanity test, I then use that clang/LLVM 
to cross build itself for for arm, armeb, i386, mips, mipsel, and ppc. 
(My host is x86_64). For the last month or so the ppc build has been 
failing when linking clang related things. The ppc code generator seems 
to want __*ti3 run time support, which it apparently didn't in the past. 
I suspect I may be missing something when I build compiler-rt. Any 
suggestions?

-Rich

P.S.: I get errors like:

/home/rich/ellcc/llvm/tools/clang/lib/Basic/Warnings.cpp:(.text._ZN5clang21ProcessWarningOptionsERNS_17DiagnosticsEngineERKNS_17DiagnosticOptionsEb+0x168): 
undefined reference to `__ashlti3'
/home/rich/ellcc/llvm/tools/clang/lib/Basic/Warnings.cpp:(.text._ZN5clang21ProcessWarningOptionsERNS_17DiagnosticsEngineERKNS_17DiagnosticOptionsEb+0x184): 
undefined reference to `__ashlti3'
/home/rich/ellcc/llvm/tools/clang/lib/Basic/Warnings.cpp:(.text._ZN5clang21ProcessWarningOptionsERNS_17DiagnosticsEngineERKNS_17DiagnosticOptionsEb+0x1a4): 
undefined reference to `__lshrti3'
/home/rich/ellcc/llvm/tools/clang/lib/Basic/Warnings.cpp:(.text._ZN5clang21ProcessWarningOptionsERNS_17DiagnosticsEngineERKNS_17DiagnosticOptionsEb+0x1cc): 
undefined reference to `__lshrti3'
/home/rich/ellcc/llvm/tools/clang/lib/Basic/Warnings.cpp:(.text._ZN5clang21ProcessWarningOptionsERNS_17DiagnosticsEngineERKNS_17DiagnosticOptionsEb+0x23c): 
undefined reference to `__lshrti3'
/home/rich/ellcc/llvm/tools/clang/lib/Basic/Warnings.cpp:(.text._ZN5clang21ProcessWarningOptionsERNS_17DiagnosticsEngineERKNS_17DiagnosticOptionsEb+0x274): 
undefined reference to `__ashlti3'
/home/rich/ellcc/llvm/tools/clang/lib/Basic/Warnings.cpp:(.text._ZN5clang21ProcessWarningOptionsERNS_17DiagnosticsEngineERKNS_17DiagnosticOptionsEb+0x294): 
undefined reference to `__lshrti3'
ecc: error: linker command failed with exit code 1 (use -v to see 
invocation)
make[4]: *** 
[/home/rich/ellcc/llvm-build-ppc-linux/Release+Asserts/bin/c-index-test] 
Error 1
make[4]: Leaving directory 
`/home/rich/ellcc/llvm-build-ppc-linux/tools/clang/tools/c-index-test'
make[3]: *** [all] Error 1
make[3]: Leaving directory 
`/home/rich/ellcc/llvm-build-ppc-linux/tools/clang/tools'
make[2]: *** [all] Error 1
make[2]: Leaving directory 
`/home/rich/ellcc/llvm-build-ppc-linux/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory `/home/rich/ellcc/llvm-build-ppc-linux/tools'
make: *** [all] Error 1
[~/ellcc/llvm-build-ppc-linux] dev%



More information about the llvm-dev mailing list