[cfe-dev] Building clang from source and header/library, > search paths

Jonathan Roelofs jonathan at codesourcery.com
Tue Dec 17 17:47:27 PST 2013


Hi Edward, Hans,

On 12/17/13, 5:32 PM, cfe-dev-request at cs.uiuc.edu wrote:
> Date: Tue, 17 Dec 2013 15:35:24 -0800
> From: Hans Wennborg<hans at chromium.org>
> To: Edward Diener<eldlistmailingz at tropicsoft.com>
> Cc: cfe-dev<cfe-dev at cs.uiuc.edu>
> Subject: Re: [cfe-dev] Building clang from source and header/library
> 	search	paths
> Message-ID:
> 	<CAB8jPheVPLhTLjQov2POD1ACd=8NQQHLP_NeLxsXGWFZ7E1E9Q at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Hi Edward,
>
> On Tue, Dec 17, 2013 at 3:24 PM, Edward Diener
> <eldlistmailingz at tropicsoft.com>  wrote:
>> >When clang is built on a Linux distro from the latest source as
>> >described byhttp://clang.llvm.org/get_started.html  how are the default
>> >header and library search paths determined ?
> I don't know exactly how it works, but the code that tries to find the
> headers and libraries is in lib/Driver/ToolChains.cpp. It's entirely
> possible that it gets things wrong on some systems.
>
Yeah, this happens in GCCInstallationDetector::init() and 
Linux::Linux(). Perhaps your distro has a nonstandard gcc-triple for 
your target that Clang doesn't know about yet? (anymore?)
>
> I'm not sure how the --with-gcc-toolchain configuration option is
> hooked up, though.
When you specify a <path> with this option, GCCInstallationDetector 
looks for an appropriate crtbegin.o in paths roughly like:
<path>/lib/gcc/<triple>/<gccversion>/crtbegin.o
and then Linux::Linux() derives paths for headers and libraries from there.
>
>   - Hans

Jon

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



More information about the cfe-dev mailing list