Unreviewed patches

Alexandre Oliva aoliva@redhat.com
Mon Jun 21 14:54:00 GMT 2004


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}



More information about the Gcc-patches mailing list