Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 1bfaa37

Browse files
Jiri Slaby (SUSE)masahir0y
Jiri Slaby (SUSE)
authored andcommitted
kbuild: dummy-tools: pretend we understand -fpatchable-function-entry
Commit 0f71dcf ("powerpc/ftrace: Add support for -fpatchable-function-entry") added a script to check for -fpatchable-function-entry compiler support. The script expects compiler to emit the section __patchable_function_entries and few nops after a function entry. If the compiler understands and emits the above, CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY is set. So teach dummy-tools' gcc about this. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 766b700 commit 1bfaa37

File tree

1 file changed

+10
-0
lines changed
  • scripts/dummy-tools

1 file changed

+10
-0
lines changed

scripts/dummy-tools/gcc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ if arg_contain -S "$@"; then
9191
fi
9292
exit 0
9393
fi
94+
95+
# For arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh
96+
if arg_contain -m64 "$@" && arg_contain -fpatchable-function-entry=2 "$@"; then
97+
echo "func:"
98+
echo ".section __patchable_function_entries"
99+
echo ".localentry"
100+
echo " nop"
101+
echo " nop"
102+
exit 0
103+
fi
94104
fi
95105

96106
# To set GCC_PLUGINS

0 commit comments

Comments
 (0)