This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Default installation directory for include files when cross compiling
Mark Mitchell wrote:
>> | 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
Further evidence that this is non-standard behavior on the part of
libstdc++ comes from PR 25938, which is a bug files against libgomp for
essentially the same issue: installing omp.h in $prefix/include, rather
than in a target-specific location.
The libgomp solution seems to have been to use:
fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude
which is a variant on the path chosen by libstdc++ with
--with-version-specific-libs is used.
(If the goal of the current setup is to save disk space, that seems a
bit too clever -- for the reasons set out in this thread,
$prefix/include isn't the right place for target headers, and, anyhow,
the disk space saved by the headers must be considerably less than the
disk space used by the libstdc++.{a,so} binaries (especially in the case
of multilibs), so the total disk space saved by sharing the headers
isn't going to make much of a difference.)
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713