Page MenuHomeSerpent OS

Boulder: Miscellaneous flags
Open, HighPublic


This covers a review of various flag options included in boulder:


  • Quick review of each standard flags -pipe -D_FORTIFY_SOURCE=2 -Wall -Wno-error -Wp,-D_REENTRANT -fPIC
  • -Bsymbolic-functions: Investigate the value of this flag, but should be relatively stable
  • -O2 vs -O3 differences when using the Clang compiler
  • -g -feliminate-unused-debug-types -fasynchronous-unwind-tables: asynchronous-unwind-tables may increase file size (hopefully it is just the debuginfo part)
  • -fno-math-errno -fno-trapping-math: Likely selectively enabled where performance sensitive
  • --as-needed: Most likely the default, is used more widely these days. Fewer deps helps all round.
  • --enable-new-dtags: Not the biggest fan of this. RPATH is really handy for testing (to ensure you're using the newly built version) and the use of RPATH in files should simply be removed in most cases.
  • -no-semantic-interposition: I don't believe clang supports this, but has somewhat the same functionality that is simply the default. Validate python in particular where this flag results in a large perf increase with this flag on GCC.
  • -fvisibility=hidden: Seems like this is a fantastic option (this is the default on windows), but will break most packages needing upstream support essentially. Packages that build on windows include __declspec(dllexport) to indicate symbols that should be exported, but most rely on the default behaviour on Linux of exporting everything despite the high costs of exporting internal symbols. Requires ABI checking and will be obvious when almost all symbols disappear that it will no longer work.