[cfe-dev] Problem building clang on FreeBSD/PPC

Justin Hibbits chmeeedalf at gmail.com
Tue Aug 30 18:59:53 PDT 2011


On Aug 30, 2011, at 4:51 PM, Roman Divacky wrote:

> 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:
>>
>> /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

Thanks, that worked.  Now to just track down this segfault I'm getting  
in clang.... have to rebuild for debug.

- Justin



More information about the cfe-dev mailing list