Skip to content

Commit 2eab791

Browse files
Jiri Slabymasahir0y
Jiri Slaby
authored andcommitted
kbuild: dummy-tools: support MPROFILE_KERNEL checks for ppc
ppc64le checks for -mprofile-kernel to define MPROFILE_KERNEL Kconfig. Kconfig calls arch/powerpc/tools/gcc-check-mprofile-kernel.sh for that purpose. This script performs two checks: 1) build with -mprofile-kernel should contain "_mcount" 2) build with -mprofile-kernel with a function marked as "notrace" should not produce "_mcount" So support this in dummy-tools' gcc, so that we have MPROFILE_KERNEL always true. Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent ce6ed1c commit 2eab791

File tree

1 file changed

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

1 file changed

+9
-0
lines changed

scripts/dummy-tools/gcc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ if arg_contain -S "$@"; then
7373
echo "%gs"
7474
exit 0
7575
fi
76+
77+
# For arch/powerpc/tools/gcc-check-mprofile-kernel.sh
78+
if arg_contain -m64 "$@" && arg_contain -mlittle-endian "$@" &&
79+
arg_contain -mprofile-kernel "$@"; then
80+
if ! test -t 0 && ! grep -q notrace; then
81+
echo "_mcount"
82+
fi
83+
exit 0
84+
fi
7685
fi
7786

7887
# To set GCC_PLUGINS

0 commit comments

Comments
 (0)