[LLVMdev] Building llvm using non-system gcc/binutils

Eli Friedman eli.friedman at gmail.com
Thu May 13 15:34:57 PDT 2010


On Thu, May 13, 2010 at 1:28 PM, john blair
<mailtome200420032002 at yahoo.com> wrote:
> Thanks for the reply Eli.
> I have the same version of gcc/binutils as my system gcc/binutils And it gets built without any errors with them.

Using a non-system gcc/binutils almost certainly isn't causing your
issues; this looks like an internal gcc bug.  Are you sure you're
using precisely the same version?  It might not be the same even if
gcc --version returns the same version number; some systems using gcc
backport fixes.

-Eli

> --- On Thu, 5/13/10, Eli Friedman <eli.friedman at gmail.com> wrote:
>
>> From: Eli Friedman <eli.friedman at gmail.com>
>> Subject: Re: [LLVMdev] Building llvm using non-system gcc/binutils
>> To: "john blair" <mailtome200420032002 at yahoo.com>
>> Cc: llvmdev at cs.uiuc.edu
>> Date: Thursday, May 13, 2010, 1:00 PM
>> On Thu, May 13, 2010 at 12:28 PM,
>> john blair
>> <mailtome200420032002 at yahoo.com>
>> wrote:
>> > I am trying to build llvm-2.7 using non-system
>> gcc/binutils. My gcc version is 4.1.2, and binutils is
>> 2.17.50.0.15. I get the following errors
>>
>> That version of gcc is known to have issues building LLVM;
>> see
>> http://llvm.org/docs/GettingStarted.html#brokengcc
>> .  Try upgrading
>> your gcc version.
>>
>> -Eli
>>
>> > `.L2438' referenced in section
>> `.gnu.linkonce.r._ZNK4llvm16DAGTypeLegalizer13getTypeActionENS_3EVTE'
>> of
>> /build/toolchain/src/llvm-2.7/objdir/Release/lib/libLLVMSelectionDAG.a(LegalizeTypes.o):
>> defined in discarded section
>> `.gnu.linkonce.t._ZNK4llvm16DAGTypeLegalizer13getTypeActionENS_3EVTE'
>> of
>> /build/toolchain/src/llvm-2.7/objdir/Release/lib/libLLVMSelectionDAG.a(LegalizeTypes.o)
>> > ....
>> > ....
>> > make[1]: ***
>> [/build/toolchain/src/llvm-2.7/objdir/Release/lib/libLLVM-2.7.so]
>> Error 1
>> > make[1]: Leaving directory
>> `/build/toolchain/src/llvm-2.7/objdir/tools/llvm-shlib'
>> > make: *** [all] Error 1
>> >
>> > I configure it using
>> > export
>> PATH=/build/toolchain/lin32/binutils-2.17.50.0.15/bin:$PATH
>> > LDFLAGS=-L"/build/toolchain/lin32/gcc-4.1.2-8/lib"
>> CC=/build/toolchain/lin32/gcc-4.1.2/bin/gcc
>> CXX=/build/toolchain/lin32/gcc-4.1.2/bin/g++
>> ../llvm-2.7/configure
>> >
>> > This works with 2.6.
>> >
>> >
>> >
>> > _______________________________________________
>> > LLVM Developers mailing list
>> > LLVMdev at cs.uiuc.edu
>>         http://llvm.cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>> >
>>
>
>
>
>
>




More information about the llvm-dev mailing list