Expand description
The conditionals the merge writes, and reading them back.
Design: spec/cross-compile/08-sysroots.md section 8.3. The macro is __GLIBC_MINOR__ because
that is glibc’s own spelling and the one __GLIBC_PREREQ reads, so every autoconf probe ever
written agrees with it. The tree does not define it; the compiler does, from the tuple’s
env_version, which is rucc_sysroot::bundled_glibc_minor.
§Why the oldest branch has no lower bound
Because a release older than the oldest one surveyed is served by defining the macro lower, and
a floor of __GLIBC_MINOR__ >= 28 on the oldest branch would serve it nothing at all. A tree
that hands 2.17 the declarations of 2.28 is too permissive, which is the direction section 8.3
accepts and document 09 section 9.5 describes; a tree that hands it an empty file is broken. So
the branches cover every value of the macro, the oldest surveyed release’s text is what anything
below it gets, and the one place that says a version was never surveyed is the guard that
replaces glibc’s own definition of the macro.
§Why every directive carries a marker
Because the merge has to be able to read its own output back, to check that what it wrote
reproduces each release, and a header full of real #if and #endif lines gives it no way to
tell which ones are its own. Counting nesting is not enough: the files being merged are the ones
with eight levels of conditionals in them. So every directive this module writes ends in
MARK, nothing else in the tree is allowed to contain that text, and reading the output back
is then a matter of looking at the end of the line.
Structs§
- Releases
- The releases a tree is merged from, in ascending order.
Constants§
- MACRO
- The macro the conditionals are written against.
- MARK
- What every directive the merge writes ends with.
Functions§
- carries_
mark - Whether a release’s own text would be mistaken for the merge’s own directives.
- directive
- One directive line, marked as ours, with its newline on it.
- evaluate
- What the preprocessor would leave of a merged file, for one value of the macro.