Re: arch/x86//kernel/ftrace.c:35:3: error: #error The following combination is not supported: ((compiler missing -mfentry) || (CONFIG_X86_32 and !CONFIG_DYNAMIC_FTRACE)) && CONFIG_FUNCTION_GRAPH_TRACER && CONFIG_CC_OPTIMIZE_FOR_SIZE

From: Josh Poimboeuf
Date: Mon Apr 17 2017 - 09:33:50 EST


On Sun, Apr 16, 2017 at 09:20:50AM +0800, kbuild test robot wrote:
> Hi Josh,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: d5ff0814fda50f0306e102f39640cf5bb76af08e
> commit: 3f135e57a4f76d24ae8d8a490314331f0ced40c5 x86/build: Mostly disable '-maccumulate-outgoing-args'
> date: 2 weeks ago
> config: x86_64-randconfig-s1-04160822 (attached as .config)
> compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
> reproduce:
> git checkout 3f135e57a4f76d24ae8d8a490314331f0ced40c5
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All errors (new ones prefixed by >>):
>
> >> arch/x86//kernel/ftrace.c:35:3: error: #error The following combination is not supported: ((compiler missing -mfentry) || (CONFIG_X86_32 and !CONFIG_DYNAMIC_FTRACE)) && CONFIG_FUNCTION_GRAPH_TRACER && CONFIG_CC_OPTIMIZE_FOR_SIZE

Hi Fengguang,

The error is working as designed. gcc < 4.6.0 doesn't have -mfentry, so
it fails the above check on x86. Can you add a skip rule? It should
skip building the following case:

x86 && ((gcc < 4.6.0) || (CONFIG_X86_32 and !CONFIG_DYNAMIC_FTRACE)) && CONFIG_FUNCTION_GRAPH_TRACER && CONFIG_CC_OPTIMIZE_FOR_SIZE

--
Josh