kbuild: dummy-tools: pretend we understand -fpatchable-function-entry

JIRA: https://issues.redhat.com/browse/RHEL-14156

commit 1bfaa37fd3486e66131de9cb87747c84b4c89a05
Author: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Date:   Mon Oct 30 12:34:16 2023 +0100

    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>

Signed-off-by: Mamatha Inamdar <minamdar@redhat.com>
This commit is contained in:
Mamatha Inamdar
2026-01-22 06:49:36 -05:00
parent 5e7937b575
commit cd448c5cb9
+10
View File
@@ -92,6 +92,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