This includes 2 hackish workarounds for our security checks, which are themselves quite hackish. It’s unclear exactly what they’re supposed to be testing and why.
Regardless, these changes are enough to fix the checks when no CXXFLAGS are passed in.
From what I can tell, the tests are intended to be self-contained and have a default set of flags, then each tests disables a default and verifies that security is weakened as intended. I’m not sure what the utility of that is, but in that spirit I’ve fixed up the default flags/compiles to work on their own.
The first is a real fix for the test source that gives us a better guarantee that fortification will be turned on. The second adds the flag that fortification requires rather than taking it from our build CXXFLAGS.