summaryrefslogtreecommitdiffstats
path: root/scripts/dummy-tools
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2023-10-30 12:34:16 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2023-11-01 15:24:56 +0100
commit1bfaa37fd3486e66131de9cb87747c84b4c89a05 (patch)
tree8400e8d7e5634d85bb6de2b9642181411b8008e7 /scripts/dummy-tools
parentkbuild: Correct missing architecture-specific hyphens (diff)
downloadlinux-1bfaa37fd3486e66131de9cb87747c84b4c89a05.tar.xz
linux-1bfaa37fd3486e66131de9cb87747c84b4c89a05.zip
kbuild: dummy-tools: pretend we understand -fpatchable-function-entry
Commit 0f71dcfb4aef ("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>
Diffstat (limited to 'scripts/dummy-tools')
-rwxr-xr-xscripts/dummy-tools/gcc10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/dummy-tools/gcc b/scripts/dummy-tools/gcc
index 07f6dc4c5cf6..e6c41427c02f 100755
--- a/scripts/dummy-tools/gcc
+++ b/scripts/dummy-tools/gcc
@@ -91,6 +91,16 @@ if arg_contain -S "$@"; then
fi
exit 0
fi
+
+ # For arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh
+ if arg_contain -m64 "$@" && arg_contain -fpatchable-function-entry=2 "$@"; then
+ echo "func:"
+ echo ".section __patchable_function_entries"
+ echo ".localentry"
+ echo " nop"
+ echo " nop"
+ exit 0
+ fi
fi
# To set GCC_PLUGINS