scripts/check_gcc.sh and scripts/check_clang.sh both fail only on a failed compilation. Neither passes -Werror, and check_gcc.sh's header deliberately does not claim warning cleanliness.
So a port can accumulate warnings indefinitely and both checks stay green.
Why it was left out of #675
Turning -Werror on without first running the warning set over all 49 port families would land a red check on day one, and nobody would know how deep the hole is. Establishing that baseline is a separate and larger piece of work than adding the flag.
There is evidence it would find real things: the kernel warning pass over common/ and common_smp/ found defects that built cleanly.
What this needs, in order
- Measure first. Run the existing stages with a candidate warning set and no
-Werror, and count warnings per port family. That number decides whether this is a week or a quarter.
- Choose the set deliberately.
-Wall -Wextra is the obvious start; the port assembly and the generated port trees will need thought, and ports_arch/ sources and their generated copies must not diverge.
- Then decide the shape. Options are a hard
-Werror once clean, a per-family allowlist that shrinks over time, or reporting warnings as a count that must not increase. The third is the cheapest to land and the easiest to ignore.
Note on scope
This is about the cross-compiled port check. It is separate from any warning policy on the Linux regression build, which compiles a different set of files with a different compiler.
Follows from #675.
scripts/check_gcc.shandscripts/check_clang.shboth fail only on a failed compilation. Neither passes-Werror, andcheck_gcc.sh's header deliberately does not claim warning cleanliness.So a port can accumulate warnings indefinitely and both checks stay green.
Why it was left out of #675
Turning
-Werroron without first running the warning set over all 49 port families would land a red check on day one, and nobody would know how deep the hole is. Establishing that baseline is a separate and larger piece of work than adding the flag.There is evidence it would find real things: the kernel warning pass over
common/andcommon_smp/found defects that built cleanly.What this needs, in order
-Werror, and count warnings per port family. That number decides whether this is a week or a quarter.-Wall -Wextrais the obvious start; the port assembly and the generated port trees will need thought, andports_arch/sources and their generated copies must not diverge.-Werroronce clean, a per-family allowlist that shrinks over time, or reporting warnings as a count that must not increase. The third is the cheapest to land and the easiest to ignore.Note on scope
This is about the cross-compiled port check. It is separate from any warning policy on the Linux regression build, which compiles a different set of files with a different compiler.
Follows from #675.