This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Primary and secondary sysroot?
- From: Ian Lance Taylor <iant at google dot com>
- To: Dmitry Mikushin <dmitry at kernelgen dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 7 Jan 2013 23:37:55 -0800
- Subject: Re: Primary and secondary sysroot?
- References: <50EAA7A7.6070301@kernelgen.org>
On Mon, Jan 7, 2013 at 2:47 AM, Dmitry Mikushin <dmitry@kernelgen.org> wrote:
>
> We have a version of GCC coming as additional toolchain for several
> supported Linux distros. Moreover, package we are shipping also contains
> modified glibc and some other libraries. In this situation, applications
> built with this compiler should first logically use its own sysroot, but in
> case when a header/library from host's sysroot is needed - fallback to the
> default "/usr" sysroot. I think this could be accomplished by providing two
> sysroots - one primary, and secondary - to complement it for the rest of
> things. Looks like currently gcc only supports a single setting for
> TARGET_SYSTEM_ROOT. Do you see any other options regarding this issue?
You are correct: GCC only supports a single system root. But I think
you can do what you want with appropriate -I and -L options, perhaps
via the C_INCLUDE_PATH and LIBRARY_PATH environment variables.
Ian