./configure script, which generates a Makefile with certain compiler and linker flags?@bagder @lattera If you're interested, CPython has adopted a subset of this guide: https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html
We've done so incrementally by creating a "ignore" file for files with the warning(s) to get the options happening in CI and then these can be incrementally "resolved" as separate issues. This is useful for larger codebases, so you don't have to resolve it all at once.
@sethmlarson @lattera we have "all" the picky warning options enabled, i was referring to more "hardening" options of the output
That OpenSSF guide is a good collection of options in an appropriate place!
@bagder @sethmlarson I'm not claiming curl should be the one to document compiler flags. rather, I'm claiming that curl could, if it chose to, adopt compiler-based exploit mitigations.
inside the curl codebase would be the right place to do it, since different compiler flags would need to be applied to libcurl.so rather than curl(1). for example, llvm's safestack cannot be applied to libcurl.so. additionally, if curl(1) was to call setjmp/longjmp, safestack could be disabled just for those call sites in curl(1).