Commit b55176e
fix(build): keep the PCH-only flags in one variable so the opt-out can't drift
1f121a3 added -Winvalid-pch alongside -fpch-preprocess but left
makefiles/fppinit.mk filtering only the literal -fpch-preprocess, so the four
FPPINIT objects -- which deliberately opt out of the PCH -- went on carrying a
PCH-only warning flag. It is inert today because none of those TUs include
fpp-pch.h, so gcc never goes looking for a .gch, but it would start warning the
moment one of them did, on exactly the objects that asked not to use the PCH.
Two hand-maintained copies of the same list drifting apart is what broke the PCH
to begin with, so name the list once: PCH_CFLAGS is defined where the flags are
added and filtered by reference where they are removed.
Verified from make -n on 32-bit armhf and aarch64:
normal object -fpch-preprocess yes -Winvalid-pch yes -g1 yes
FPPINIT object no no no
fpp-pch.h.gch yes yes yes
Full build otherwise unchanged: 177.7s, 204 objects, rc=0, and zero
-Winvalid-pch warnings.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 386e7c6 commit b55176e
3 files changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
132 | 137 | | |
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
136 | 141 | | |
137 | | - | |
| 142 | + | |
| 143 | + | |
138 | 144 | | |
139 | 145 | | |
140 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
0 commit comments