Default installation directory for include files when cross compiling
Gabriel Dos Reis
gdr@cs.tamu.edu
Sat Jun 17 00:23:00 GMT 2006
On Fri, 16 Jun 2006, Mark Mitchell wrote:
| Gabriel Dos Reis wrote:
| > Mark Mitchell <mark@codesourcery.com> writes:
| >
| > | By default, libstdc++ seems to install include files in $prefix/include,
| > | even when cross-compiling.
| > |
| > | # Default case for install directory for include files.
| > |
| > | if test $version_specific_libs = no && test $gxx_include_dir = no; then
| > | gxx_include_dir='${prefix}/include/c++/${gcc_version}'
| > | fi
| > |
| > | The theory seems to be that these files are target-independent, and so
| > | can be shared if multiple targets are installed in one $prefix, from the
| > | same sources. But, $prefix/include should be for host include files,
| > | not for target include files, so this seems weird if you're only
| > | installing a cross compiler, and it clearly breaks if you install a host
| > | compiler built from different sources in the same prefix as one of your
| > | target compilers.
| >
| > would not you want to use different $prefix, from host $prefix, for
| > different targets?
|
| If each target gets its own prefix, then the current default has no
| advantage over my suggestion, other than brevity -- there is no actual
| sharing of header files. If you think that the brevity is worthwhile,
| then you could also put libstdc++.a into $prefix/lib, rather than
| $prefix/$target/lib.a; by hypothesis, there is no possible conflict with
| a host libstdc++.a.
"brevity" is an argument you just made, so I'm not going to claim
credit for its coherence :-)
However, my question was genuine, not rhetorical.
It was a question to know.
| However, in practice, one does want to put multiple targets into a
| single prefix, and that generally works. That's one reason that cross
| compilers are named $target-gcc; it allows multiple target installations
cross-compilers are platform-independent, unlike the bulk of libstdc++
headers.
My question was genuine and to know: if you really don't want to share
target-independent files, why would you not make that decision and
tell configure? If we have to reverse the default, we need a way to
say "please share target-independent headers".
-- Gaby
More information about the Libstdc++
mailing list