Arvind Sankar 7afd08666e lib/string: Use freestanding environment
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.

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888
Change-Id: I9dc26de8617d7417de2a60c40fcc05687abb3f68
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-06-04 21:03:24 -03:00
..
2022-06-30 14:12:20 +00:00
2022-06-30 14:12:20 +00:00
2024-06-04 21:03:24 -03:00
2022-06-30 14:12:20 +00:00
2024-05-10 15:48:35 -03:00
2022-06-10 15:41:44 +07:00
2017-06-09 11:52:07 +02:00
2019-04-20 09:15:07 +02:00
2022-06-10 15:41:42 +07:00
2017-08-15 09:02:07 -07:00