3 ms·
This may be a controversial statement, but I don't think projects should distribute any flags aside from the bare minimum to get everything working. E.g.: -
by tmtvl 4y ago
This may be a controversial statement, but I don't think projects should distribute any flags aside from the bare minimum to get everything working. E.g.:
-std=c17 -lm
And let downstream add their own flags (-Owhatever, -fsomething,...) on top of that.
- rwmj 4y agoThat's right. Fedora overrides a lot of flags globally, eg. adding -D_FORTIFY_SOURCE=3 and a bunch of other hardening stuff.
- injinj 4y agoThat's new. Wow, latest has -mno-omit-leaf-frame-pointer (rpm --eval '%{optflags}') Do you know of a way to get rpmbuild to keep the -ffat-lto-objects in the ar libs?
- account42 4y agoThere are many more flags such as -ffast-math where the project will be better positioned to decide if they make sense than some random packager juggling hundreds of packages. Even for optimzation flags that don't change behavior there is no clear best set of flags that you should blindly apply to all projects.