This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Updates to --with-sysroot support


On Mon, Nov 04, 2002 at 11:57:29AM -0500, Daniel Jacobowitz wrote:
> I spent a couple days working with this and finally found a solution for
> (most of) my concerns.  This patch:
> 
>  - Fixes an undocumented behavior in cppinit.c which I consider to be a bug.
>    If -iprefix was used to change the compiler prefix, then first the
>    standard include directories which begin with the prefix were searched
>    (using the relocated prefix); then all directories were searched in order
>    (using the original prefix).  This means that -iprefix'd versions of
>    GCC_INCLUDE_DIR (that's -iprefix's prefix followed by "include", folks)
>    would be searched before GPLUSPLUS_INCLUDE_DIR.  Oops.
>    I changed this so that the order is preserved, and unrelocated versions
>    are not searched.  This means that people who were using -iprefix and
>    still expecting to get GCC's <stddef.h> et al. from the normal location
>    are out of luck; they'll have to specify that path as an -isystem
>    explicitly.  I think this change is correct but I'd like a second
>    opinion.
> 
>  - No longer defines PREFIX_INCLUDE_DIR for a sysrooted compiler.  This
>    one's a little more arguable but I think it's appropriate.  The sysrooted
>    compiler should work like a system compiler inside of $sysroot; searching
>    $prefix/include defeats that.
>    I need this in my local setups but I won't be heartbroken if it's
>    considered wrong for the FSF tree :)

Just for the record, I like the sound of both these changes.

Am I correct in thinking that for a normal Unix native compiler, you
could set sysroot to "/usr" and get the expected behavior?  Or is it
prepended to $prefix?  Or what?

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]