isysroot and various headers

Devang Patel dpatel@apple.com
Tue Jan 4 22:57:00 GMT 2005


On Jan 4, 2005, at 2:29 PM, Daniel Jacobowitz wrote:

> On Tue, Jan 04, 2005 at 02:10:28PM -0800, Devang Patel wrote:
>>
>> On Jan 3, 2005, at 5:48 PM, Daniel Jacobowitz wrote:
>>
>>> On Mon, Jan 03, 2005 at 05:08:58PM -0800, Devang Patel wrote:
>>>> Few weeks ago there was one discussion about isysroot. It allows 
>>>> user
>>>> to supply set of include headers some where else (other than
>>>> /usr/include). We have a requirement that requires compiler to find
>>>> ALL
>>>> headers (including compiler headers) in isysroot path. Which means a
>>>> patch like following is needed. Does it match isysroot's intended 
>>>> use?
>>>> If yes, I'll schedule it for 4.1.
>>>
>>> No, definitely not.  This will break all sorts of normal setups, i.e.
>>> anything where the default configuration has a sysroot.
>>>
>>> --with-sysroot=/prefix/sys-root would cause
>>> /prefix/lib/gcc/..../include
>>> to look for /prefix/sys-root/prefix/lib/gcc/..../include.
>>>
>>> I think you need to describe your "requirement" a bit better.
>>
>> In one sentence, "Find ALL headers and libraries in SDK root".
>> Right now, when -isysroot points to SDK root, compiler searches for
>> system
>> headers in SDK root instead of default system header path.
>>
>> But, SDK root contains libraries, for example libstdc++, for the 
>> target
>> SDK,
>> so it is expected that compiler also finds C++ STL headers from SDK
>> root.
>
> Language headers are a different case, indeed.  A way to make the
> language headers live in the sysroot would be nice; I currently use a
> fragile solution that is relocatable, but independent of -isysroot.

Any suggestion/thoughts on how to keep language headers in sysroot
and use -isysroot to find them?

> Ideally they would be installed in their native locations + sysroot
> path when configured --with-sysroot; then we could turn on the sysroot
> flag.

We do not build compiler with --with-sysroot. Same system compiler is 
used
to build projects using default system root as well as SDK root.

> However, other headers should _not_ be searched in the sysroot: namely
> tooldir/include.

-
Devang



More information about the Gcc mailing list