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
You need to sign in or sign up before continuing.
  • linux
  • lib
  • Makefile
Find file BlameHistoryPermalink
  • Arvind Sankar's avatar
    lib/string.c: Use freestanding environment · 33d0f96f
    Arvind Sankar authored Aug 19, 2020
    
    
    gcc can transform the loop in a naive implementation of memset/memcpy
    etc into a call to the function itself.  This optimization is enabled by
    -ftree-loop-distribute-patterns.
    
    This has been the case for a while, but gcc-10.x enables this option at
    -O2 rather than -O3 as in previous versions.
    
    Add -ffreestanding, which implicitly disables this optimization with
    gcc.  It is unclear whether clang performs such optimizations, but
    hopefully it will also not do so in a freestanding environment.
    
    Signed-off-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
    Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888
    
    
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    33d0f96f
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7