Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • tools
  • include
  • nolibc
  • stackprotector.h
Find file BlameHistoryPermalink
  • Thomas Weißschuh's avatar
    tools/nolibc: add autodetection for stackprotector support · 818924d1
    Thomas Weißschuh authored May 21, 2023
    
    
    The stackprotector support in nolibc should be enabled iff it is also
    enabled in the compiler.
    Use the preprocessor defines added by gcc and clang if stackprotector
    support is enable to automatically do so in nolibc.
    
    This completely removes the need for any user-visible API.
    
    To avoid inlining the lengthy preprocessor check into every user
    introduce a new header compiler.h that abstracts the logic away.
    
    As the define NOLIBC_STACKPROTECTOR is now not user-relevant anymore
    prefix it with an underscore.
    
    Suggested-by: default avatarWilly Tarreau <w@1wt.eu>
    Link: https://lore.kernel.org/lkml/20230520133237.GA27501@1wt.eu/
    
    
    Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
    Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    818924d1
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7