Default installation directory for include files when cross compiling

Mark Mitchell mark@codesourcery.com
Sat Jun 17 00:42:00 GMT 2006


Gabriel Dos Reis wrote:
> On Fri, 16 Jun 2006, Mark Mitchell wrote:
> 
> | $prefix/include isn't the right place for target headers, and, anyhow,
> 
> $prefix here is the include for install dir.  The notions of host,
> build, target are different for compilers than for the libraries.
> The library is built and installed for the target, and $prefix is the
> installation prefix for the target.  $prefix/include is used for
> target independent files, and the target-dependent ones go elsewhere
> properly marked as dependent on target.

I understand the build machinery differences for libraries.  The key
difference is that when building the libraries $host is set to what is
called $target when building the compiler.  However, $prefix is the
same, and $prefix/include is for host header files, i.e., header files
for the system on which the compilers will run.

> The default, when it was done, was for common cases: native builds.
> It was mostly done for matching the way other libraries are built and
> installed.

It is OK to leave the default as is for native builds.  However, the
default for cross builds should be changed.  I do not think your
assertion about matching other libraries is correct; most of the
toolchain correctly installs target headers in directories with $target
in their name.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Libstdc++ mailing list