https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104500
Bug ID: 104500
Summary: Document directory layout for installed C++ headers
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Keywords: documentation
Severity: minor
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
https://gcc.gnu.org/onlinedocs/libstdc++/manual/source_organization.html
describes the directory layout in the source tree, but we have nothing
describing the post-install tree.
Draft:
Libstdc++ headers are always split across three directories:
$prefix/include/c++/$version: Most headers are here, and are
target-independent.
$prefix/include/c++/$version/$triplet: target-specific headers such as
bits/c++config.h, CPU-specific atomics (predating __atomic built-ins and
libatomic), and headers that depend on the build-time GCC config options like
the choice of thread model, locale backend, allocator backend, etc.
$prefix/include/c++/$version/backward: <strstream> and legacy headers like
<hash_map>.
The second one will be modified by the multilib options, so on x86_64 -m32 will
use $prefix/include/c++/$version/$triplet/32 instead.
In all cases, $version might be X.Y.Z or just X if GCC was configured with
--with-gcc-major-version-only