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 Nov  4, 2002, Daniel Jacobowitz <drow@mvista.com> wrote:

>  - 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.

Oops, indeed :-)

>    I changed this so that the order is preserved, and unrelocated versions
>    are not searched.

I'm not sure like the second part.  Couldn't it break compiles within
the build tree, or at least disrupt the build-tree staging area that
we've been discussing about.  Ideally, I think we should search the
original pathname, just let the relocated one be searched first, but I
don't have a strong opinion on this, and could be easily convinced
that it's a bad idea.  In fact, I've almost managed to convince myself
of it :-)

>  - Searches prefixed versions of LOCAL_INCLUDE_DIR, SYSTEM_INCLUDE_DIR,
>    and STANDARD_INCLUDE_DIR.

>  - Relocates those prefixed directories by passing -isysroot to cc1 to
>    override the normal prefix.

Yay!

>  - Fixes a bug in make_relative_path; it only worked if exec_prefix was the
>    same as or inside of prefix, which generally worked for exec_prefix
>    but won't now that we use this function for the sysroot too.

Excellent.

> With this and some -rpath-link's, I can build a complete relocatable sysroot
> compiler without having to specify the sysroot via $gcc_tooldir.  How's it
> look?

> 	* doc/invoke.texi (Spec Files): Update description of %I.

If I understand your change to make_relative_path correctly, you may
want to tweak the part of the docs that says that --with-sysroot must
be a subdirectory of exec-prefix or gcc_tooldir, and arrange for the
top-level to no longer turn it into a gcc_tooldir-relative reference
for relocatability.  In fact, I suspect a number of relocatability
issues may have become much simpler with this change.  So much so that
I fear there may be something that justified the libsubdir-based
references that both of us are missing :-(

Anyway, way to go, /me says!  No that I can approve this patch, but if
I could, I would :-)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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