-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Ian,
Thanks for reply, unfortunately setting extra flags does not help in our case, as we want to conserve original build rules for any application. A brilliant solution suggested by Richard Guenther on IRC is to place first-priority includes and headers into lib/gcc/x86_64-unknown-linux-gnu/4.6.4/ (or also in 32/, if multilib). Then, this content would have higher priority than system include/library paths. Thus, lib/gcc/x86_64-unknown-linux-gnu/4.6.4/ becomes primary root and system becomes secondary root! - - D. On 01/08/2013 08:37 AM, Ian Lance Taylor wrote: > On Mon, Jan 7, 2013 at 2:47 AM, Dmitry Mikushin > <dmi...@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 > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBAgAGBQJQ+DHgAAoJENwm3+sbf/pMYPkH/3EDJ/1j7nbbUMGHKPwfMLzx 1Xg0fP0NaY3eSfSdQk/zQ9ivYCothC9u6lyPeCbiGBus0TR0C1ra/aPMKwqwkJpJ FeuTExQxtqB/xxD1xmdOFNY023mivkoVZoZ4HYdHa2Xe6Uk+Pg/3MWzVaq+ePUgM IILUaUz7iVf7rg/8gIy1U11vXBH2br9cbogXpuQv6L7UqlZsPmo3FhXbdWxeXn+3 +ZnhERwY4fKxABGE4gcYDwUCysjQymo8a/AsV5cQsnesLxDV/6svAElBV2MJkf7z HKDrZuEJt9BG9Nmemn6jl3Jmp8ZlGS4qH8XGAvjZiJYWaf61z/eme5t7hYq1ixg= =n52n -----END PGP SIGNATURE-----