Skip to content
Snippets Groups Projects

Clean up construction of compiler flags

Merged Paul McCarthy requested to merge mnt/c++standard into master
  • Flatten $FSLDIR/config directory by moving config/common/* into config/.
  • Set default C/C++ standards as -std=c99 / -std=c++11.
  • Honour CC, CXX, CFLAGS, CXXFLAGS, and LDFLAGS set by the environment - if unset, use defaults defined in buildSettings.mk.
  • Formalise and document construction of final CFLAGS/CXXFLAGS/LDFLAGS used in compilation of C/C++ projects:
    1. USRCFLAGS/USRCXXFLAGS/USRLDFLAGS are defined in project specific Makefiles, and have the highest precedence
    2. ARCHCFLAGS/ARCHCXXFLAGS/ARCHLDFLAGS are defined in buildSettings.mk, and have higher precedence over the environment
    3. CFLAGS/CXXFLAGS/LDFLAGS are provided by the environment (with fallback defaults in buildSettings.mk), and have the lowest precedence.
  • Do not set any C++ ABI compatibility flags - these can be provided by the environment
  • Honour CPPFLAGS, and allow projects to set USRCPPFLAGS, to control C/C++ preprocessor. Will probably never get used, but added for completeness.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading