[cfe-dev] Problem building clang on FreeBSD/PPC
Roman Divacky
rdivacky at freebsd.org
Tue Aug 30 13:51:27 PDT 2011
On Tue, Aug 30, 2011 at 04:47:52PM -0400, Justin Hibbits wrote:
> I'm trying to build clang SVN (full LLVM checkout), but am running
> into problems when linking clang. The message I get is:
>
> g++ -I/home/chmeee/llvm/include -I/home/chmeee/llvm/tools/clang/tools/
> driver -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -
> D__STDC_CONSTANT_MACROS -I/home/chmeee/llvm/tools/clang/tools/
> driver/../../include -I/home/chmeee/llvm/tools/clang/tools/
> driver/../../include -g -fno-exceptions -fno-rtti -fPIC -Woverloaded-
> virtual -Wcast-qual -fno-strict-aliasing -g -Wl,-R -Wl,'$ORIGIN/../
> lib' -Wl,-R -Wl,/home/chmeee/llvm/Debug+Asserts/bin -Wl,-export-
> dynamic -L/home/chmeee/llvm/Debug+Asserts/lib -L/home/chmeee/llvm/Debug
> +Asserts/lib -pedantic -Wno-long-long -Wall -W -Wno-unused-
> parameter -Wwrite-strings -o /home/chmeee/llvm/Debug+Asserts/bin/
> clang /home/chmeee/llvm/tools/clang/tools/driver/Debug+Asserts/
> cc1_main.o /home/chmeee/llvm/tools/clang/tools/driver/Debug+Asserts/
> cc1as_main.o /home/chmeee/llvm/tools/clang/tools/driver/Debug+Asserts/
> driver.o -lclangFrontendTool -lclangFrontend -lclangDriver -
> lclangSerialization -lclangCodeGen -lclangParse -lclangSema -
> lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -
> lclangStaticAnalyzerCore -lclangAnalysis -lclangIndex -
> lclangARCMigrate -lclangRewrite -lclangAST -lclangLex -lclangBasic \
> -lLLVMipo -lLLVMInstrumentation -lLLVMBitWriter -lLLVMBitReader -
> lLLVMAsmParser -lLLVMPowerPCCodeGen -lLLVMPowerPCDesc -
> lLLVMPowerPCAsmPrinter -lLLVMPowerPCInfo -lLLVMX86Disassembler -
> lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMSelectionDAG -
> lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -
> lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -
> lLLVMTarget -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMCore -
> lLLVMX86Info -lLLVMMC -lLLVMSupport -lLLVMSystem -lpthread -lm
>
> /usr/lib/crt1.o: In function `_start':
> crt1.c:(.text+0xa8): relocation truncated to fit: R_PPC_REL24 against
> symbol `atexit@@FBSD_1.0' defined in .plt section in /usr/lib/crt1.o
> crt1.c:(.text+0xb4): relocation truncated to fit: R_PPC_REL24 against
> symbol `atexit@@FBSD_1.0' defined in .plt section in /usr/lib/crt1.o
> crt1.c:(.text+0xcc): relocation truncated to fit: R_PPC_REL24 against
> symbol `exit@@FBSD_1.0' defined in .plt section in /usr/lib/crt1.o
> crt1.c:(.text+0xd0): relocation truncated to fit: R_PPC_REL24 against
> symbol `_init_tls@@FBSD_1.0' defined in .plt section in /usr/lib/crt1.o
> /home/chmeee/llvm/tools/clang/tools/driver/Debug+Asserts/cc1_main.o:
> In function `std::__verify_grouping(char const*, unsigned int,
> std::string const&)':
> /usr/include/c++/4.2/bits/locale_facets.tcc:2560: relocation truncated
> to fit: R_PPC_PLTREL24 against symbol `std::string::size()
> const@@GLIBCXX_3.4' defined in .plt section in /usr/lib/crt1.o
> /usr/include/c++/4.2/bits/locale_facets.tcc:2569: relocation truncated
> to fit: R_PPC_PLTREL24 against symbol `std::string::operator[]
> (unsigned int) const@@GLIBCXX_3.4' defined in .plt section in /usr/lib/
> crt1.o
> /usr/include/c++/4.2/bits/locale_facets.tcc:2571: relocation truncated
> to fit: R_PPC_PLTREL24 against symbol `std::string::operator[]
> (unsigned int) const@@GLIBCXX_3.4' defined in .plt section in /usr/lib/
> crt1.o
> /usr/include/c++/4.2/bits/locale_facets.tcc:2576: relocation truncated
> to fit: R_PPC_PLTREL24 against symbol `std::string::operator[]
> (unsigned int) const@@GLIBCXX_3.4' defined in .plt section in /usr/lib/
> crt1.o
> /home/chmeee/llvm/tools/clang/tools/driver/Debug+Asserts/cc1_main.o:
> In function `__gthread_active_p':
> /usr/include/c++/4.2/bits/gthr-default.h:188: relocation truncated to
> fit: R_PPC_PLTREL24 against symbol `pthread_mutex_lock@@FBSD_1.0'
> defined in .plt section in /usr/lib/crt1.o
> /usr/include/c++/4.2/bits/gthr-default.h:189: relocation truncated to
> fit: R_PPC_PLTREL24 against symbol `pthread_once@@FBSD_1.0' defined
> in .plt section in /usr/lib/crt1.o
> /usr/include/c++/4.2/bits/gthr-default.h:190: additional relocation
> overflows omitted from the output
>
>
> The strange thing is clang-devel compiles in ports, which is r133062,
> from June. I don't know the difference between my build setup and the
> ports infrastructure, all I'm doing is a simple configure/gmake.
>
> Anyone know what may be going on?
LLVM is just too big to be compiled on PPC32. I think it does work when
you compile only the PPC32 backend in, ie.
./configure --enable-targets=powerpc --enable-optimized
roman
More information about the cfe-dev
mailing list