[PATCH 1/9] Kbuild: only pass -fno-inline-functions-called-once for gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Arnd Bergmann <arnd@xxxxxxxx>

clang ignores the -fno-inline-functions-called-once option, but warns
when building with -Wignored-optimization-argument enabled:

clang: error: optimization flag '-fno-inline-functions-called-once' is not supported [-Werror,-Wignored-optimization-argument]

Move it back to using cc-option for this one.

Fixes: 7d73c3e9c514 ("Makefile: remove stale cc-option checks")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index bf5a6100cf66e..991c02f8e9ac0 100644
--- a/Makefile
+++ b/Makefile
@@ -967,7 +967,7 @@ endif
 
 # We trigger additional mismatches with less inlining
 ifdef CONFIG_DEBUG_SECTION_MISMATCH
-KBUILD_CFLAGS += -fno-inline-functions-called-once
+KBUILD_CFLAGS += $(call cc-option,-fno-inline-functions-called-once)
 endif
 
 # `rustc`'s `-Zfunction-sections` applies to data too (as of 1.59.0).
-- 
2.39.2




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux