This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unreviewed patches
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 21 Jun 2004 08:54:05 -0300
- Subject: Re: Unreviewed patches
- Organization: Red Hat Global Engineering Services Compiler Team
- References: <200406190954.57295.ebotcazou@libertysurf.fr>
On Jun 19, 2004, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> Fix PR target/15082 (makefile machinery)
> http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00173.html
Sorry for having missed the patch at first.
I'm afraid it is not correct.
When building a cross compiler to a hosted OS, you have two options:
- use --with-headers/--with-libs (deprecated), and these will copy
stuff to sys-include and lib, or
- use --with-sysroot, and make sure the sysroot already contains a
copy/link/whatever of the relevant bits of relevant headers,
libraries and object files you expect to find in the root filesystem
or the target OS.
In either case, the goal is to not touch the install tree during
compilation. Sure enough, --with-headers/libs do touch the install
tree, but they were broken by design, which is just one of the reasons
for the switch to --with-sysroot.
This is why we no longer run recursively invoke the
install-gcc-tooldir target from stmp-fixinc, and instead just print a
warning.
One thing we could do to improve this significantly, however, is to
take advantage of the fact that we no longer need to use
${gcc_tooldir} for pathnames to be relocated correctly if you move the
install tree after installation. I'd be quite happy to review and
hopefully approve a change to configure.ac that changed the default
setting of CROSS_SYSTEM_HEADER_DIR to look more like the definition in
the --with-sysroot case, and a corresponding change in Makefile.in
such that we not fail when compiling for embedded targets that don't
have a root filesystem. Would you give that a try?
Thanks,
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}