Commit 56cf5545 authored by Guo Xuenan's avatar Guo Xuenan Committed by Yuntao Liu
Browse files

Revert "compiler: remove CONFIG_OPTIMIZE_INLINING entirely"

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8PGC4



--------------------------------

This reverts commit 889b3c12.

Signed-off-by: default avatarGuo Xuenan <guoxuenan@huawei.com>
Signed-off-by: default avatarYuntao Liu <liuyuntao12@huawei.com>
parent ea6de9f6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -280,5 +280,6 @@ CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
CONFIG_EARLY_PRINTK_DBGP=y
CONFIG_DEBUG_BOOT_PARAMS=y
CONFIG_OPTIMIZE_INLINING=y
CONFIG_UNWINDER_FRAME_POINTER=y
# CONFIG_64BIT is not set
+1 −0
Original line number Diff line number Diff line
@@ -276,3 +276,4 @@ CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
CONFIG_EARLY_PRINTK_DBGP=y
CONFIG_DEBUG_BOOT_PARAMS=y
CONFIG_OPTIMIZE_INLINING=y
+8 −0
Original line number Diff line number Diff line
@@ -206,13 +206,21 @@ struct ftrace_likely_data {
#define __naked			__attribute__((__naked__)) notrace

/*
 * Force always-inline if the user requests it so via the .config.
 * Prefer gnu_inline, so that extern inline functions do not emit an
 * externally visible function. This makes extern inline behave as per gnu89
 * semantics rather than c99. This prevents multiple symbol definition errors
 * of extern inline functions at link time.
 * A lot of inline functions can cause havoc with function tracing.
 * Do not use __always_inline here, since currently it expands to inline again
 * (which would break users of __always_inline).
 */
#if !defined(CONFIG_OPTIMIZE_INLINING)
#define inline inline __attribute__((__always_inline__)) __gnu_inline \
	__inline_maybe_unused notrace
#else
#define inline inline __gnu_inline __inline_maybe_unused notrace
#endif

/*
 * gcc provides both __inline__ and __inline as alternate spellings of
+1 −0
Original line number Diff line number Diff line
@@ -6,5 +6,6 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KERNEL_XZ=y
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
CONFIG_OPTIMIZE_INLINING=y
CONFIG_SLUB=y
CONFIG_SLUB_TINY=y
+12 −0
Original line number Diff line number Diff line
@@ -474,6 +474,18 @@ config HEADERS_INSTALL
	  user-space program samples. It is also needed by some features such
	  as uapi header sanity checks.

config OPTIMIZE_INLINING
	def_bool y
	help
	  This option determines if the kernel forces gcc to inline the functions
	  developers have marked 'inline'. Doing so takes away freedom from gcc to
	  do what it thinks is best, which is desirable for the gcc 3.x series of
	  compilers. The gcc 4.x series have a rewritten inlining algorithm and
	  enabling this option will generate a smaller kernel there. Hopefully
	  this algorithm is so good that allowing gcc 4.x and above to make the
	  decision will become the default in the future. Until then this option
	  is there to test gcc for this.

config DEBUG_SECTION_MISMATCH
	bool "Enable full Section mismatch analysis"
	depends on CC_IS_GCC