[cfe-dev] choosing the gcc toolchain

Jonathan Roelofs jonathan at codesourcery.com
Fri Feb 28 12:29:09 PST 2014


Reed,

Which multilib folders do your 4.7.2, 4.7, and 4.6 gcc installations each have 
respectively?

Jon

On 2/28/14, 11:20 AM, Reed Kotler wrote:
> Seems to almost work.
> It should have picked up 4.7.2 I would think.
>
> rkotler at mipsswbrd006-le:~/caviumllvmwclang/install/bin$ ./clang -v
> clang version 3.5 (gitosis at dmz-portal.mips.com:clang.git
> 42303467cd4adb0dbcbead5517482265ea111bfa) (gitosis at dmz-portal.mips.com:llvm.git
> 0ff25b31d895c82d3fea67b76531c9580ce00d0a)
> Target: mipsel-unknown-linux-gnu
> Thread model: posix
> Found candidate GCC installation: /usr/lib/gcc/mipsel-linux-gnu/4.4
> Found candidate GCC installation: /usr/lib/gcc/mipsel-linux-gnu/4.4.6
> Found candidate GCC installation: /usr/lib/gcc/mipsel-linux-gnu/4.4.7
> Found candidate GCC installation: /usr/lib/gcc/mipsel-linux-gnu/4.6
> Found candidate GCC installation: /usr/lib/gcc/mipsel-linux-gnu/4.6.3
> Found candidate GCC installation: /usr/lib/gcc/mipsel-linux-gnu/4.7
> Found candidate GCC installation: /usr/lib/gcc/mipsel-linux-gnu/4.7.2
> Selected GCC installation: /usr/lib/gcc/mipsel-linux-gnu/4.7
> Candidate multilib: .;@m32
> Selected multilib: .;@m32
>
> I do a diff in my area and pick up some other changes that look like formatting
> changes from my clang. Not sure why.
>
> I only made the change you suggested.
>
> On 02/27/2014 10:00 PM, Simon Atanasyan wrote:
>> It looks like a regression after r201205. The problem is in the end of
>> the findMIPSMultilibs routine in the following line:
>>
>> [[
>> else if (DebianMipsMultilibs.size() == 3) {
>> ]]
>>
>> The clang driver does not select a regular Debian MIPS toolchain if
>> the toolchain includes 32-bit libraries only and does not include 64
>> and n32 variants.
>>
>> If temporarily delete FSF and CS toolchain selection it solves the
>> problem at least on my x86-64 Debian machines with a regular MIPS 4.7
>> toolchain.
>>
>> [[
>> --- a/lib/Driver/ToolChains.cpp
>> +++ b/lib/Driver/ToolChains.cpp
>> @@ -1802,13 +1802,10 @@ bool
>> Generic_GCC::GCCInstallationDetector::findMIPSMultilibs(
>>     //  a bit of overlap in the directories that each specifies)
>>     if (TargetTriple.getEnvironment() == llvm::Triple::Android)
>>       Multilibs.combineWith(AndroidMipsMultilibs);
>> -  else if (DebianMipsMultilibs.size() == 3) {
>> +  else {
>>       Multilibs.combineWith(DebianMipsMultilibs);
>>       BiarchSibling = Multilib();
>> -  } else if (FSFMipsMultilibs.size() > CSMipsMultilibs.size())
>> -    Multilibs.combineWith(FSFMipsMultilibs);
>> -  else
>> -    Multilibs.combineWith(CSMipsMultilibs);
>> +  }
>>
>>     llvm::Triple::ArchType TargetArch = TargetTriple.getArch();
>>
>> ]]
>>
>> Reed, could you check this hack on the cavium board?
>>
>> I will try to fix this bug.
>>
>> On Fri, Feb 28, 2014 at 3:37 AM, reed kotler
>> <rkotler-8NJIiSa5LzA at public.gmane.org> wrote:
>>> The clang is working ok. I can compile, link and run a program in a simple
>>> fashion.
>>>
>>> I will take a look.
>>
>> [...]
>>
>>> On 02/27/2014 03:34 PM, Chandler Carruth wrote:
>>>
>>> My best guess is that the multilib stuff wasn't setup correctly. Note that
>>> MIPS has custom logic for this (findMIPSMultilibs). If that fails, then
>>> we'll not use the newer GCC installation. You could add logging there to try
>>> and figure out why.
>>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded



More information about the cfe-dev mailing list