aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar David S. Miller <davem@davemloft.net> 2020-08-23 11:48:27 -0700
committerGravatar David S. Miller <davem@davemloft.net> 2020-08-23 11:48:27 -0700
commit7611cbb900b4b9a6fe5eca12fb12645c0576a015 (patch)
tree9c8c8e1fa991e4728d25a19b86c974c8e49ee1b7 /lib
parentMerge branch 'l2tp-replace-custom-logging-code-with-tracepoints' (diff)
parentMerge tag 'powerpc-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/po... (diff)
downloadlinux-7611cbb900b4b9a6fe5eca12fb12645c0576a015.tar.gz
linux-7611cbb900b4b9a6fe5eca12fb12645c0576a015.tar.bz2
linux-7611cbb900b4b9a6fe5eca12fb12645c0576a015.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Makefile b/lib/Makefile
index e290fc5707ea..a4a4c6864f51 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -15,11 +15,16 @@ KCOV_INSTRUMENT_debugobjects.o := n
KCOV_INSTRUMENT_dynamic_debug.o := n
KCOV_INSTRUMENT_fault-inject.o := n
+# string.o implements standard library functions like memset/memcpy etc.
+# Use -ffreestanding to ensure that the compiler does not try to "optimize"
+# them into calls to themselves.
+CFLAGS_string.o := -ffreestanding
+
# Early boot use of cmdline, don't instrument it
ifdef CONFIG_AMD_MEM_ENCRYPT
KASAN_SANITIZE_string.o := n
-CFLAGS_string.o := -fno-stack-protector
+CFLAGS_string.o += -fno-stack-protector
endif
# Used by KCSAN while enabled, avoid recursion.