[cfe-commits] r140604 - /cfe/trunk/lib/Driver/ToolChains.cpp

David Chisnall csdavec at swan.ac.uk
Sat Oct 1 01:03:05 PDT 2011


As the commit message implies, it was making -B work for paths that are provided to ld under Linux.  A lot of cross-compile toolchains put things like crtbegin.o in an SDK-specific location.  With this applied, it was possible to just add -B/path/to/sdk to the clang flags and have things work.

If this has been reverted, then please can someone implement the same feature in a better way?  Without it, I will no longer be able to cross-compile targeting ARM/Linux...

David

On 1 Oct 2011, at 01:00, Eric Christopher wrote:

> I have no idea what this patch is doing. Could you explain it a bit?
> 
> -eric
> 
> On Sep 27, 2011, at 6:31 AM, David Chisnall wrote:
> 
>> Author: theraven
>> Date: Tue Sep 27 08:31:58 2011
>> New Revision: 140604
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=140604&view=rev
>> Log:
>> Let -B work for ld paths on Linux.
>> 
>> 
>> Modified:
>>   cfe/trunk/lib/Driver/ToolChains.cpp
>> 
>> Modified: cfe/trunk/lib/Driver/ToolChains.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=140604&r1=140603&r2=140604&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Driver/ToolChains.cpp (original)
>> +++ cfe/trunk/lib/Driver/ToolChains.cpp Tue Sep 27 08:31:58 2011
>> @@ -1696,8 +1696,8 @@
>>  // FIXME: This is in here to find crt1.o. It is provided by libc, and
>>  // libc (like gcc), can be installed in any directory. Once we are
>>  // fetching this from a config file, we should have a libc prefix.
>> -  Paths.push_back("/lib/../" + Lib);
>> -  Paths.push_back("/usr/lib/../" + Lib);
>> +  Paths.push_back("=/lib/../" + Lib);
>> +  Paths.push_back("=/usr/lib/../" + Lib);
>> 
>>  if (!Suffix.empty())
>>    Paths.push_back(Base);
>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 





More information about the cfe-commits mailing list