]> git.baikalelectronics.ru Git - kernel.git/commit
scripts/recordmcount.pl: Remove check_objcopy() and $can_use_local
authorNathan Chancellor <nathan@kernel.org>
Mon, 2 Aug 2021 21:03:07 +0000 (14:03 -0700)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 4 Aug 2021 21:49:26 +0000 (17:49 -0400)
commit7ebcd6f3876e53112bad9e98ed7e2bb13cac6346
treefce6311149ec8495add3f6c80e0b4b1503b799bf
parentacc2746e0938d348dd1e276ecccbf5987d493a6f
scripts/recordmcount.pl: Remove check_objcopy() and $can_use_local

When building ARCH=riscv allmodconfig with llvm-objcopy, the objcopy
version warning from this script appears:

WARNING: could not find objcopy version or version is less than 2.17.
        Local function references are disabled.

The check_objcopy() function in scripts/recordmcount.pl is set up to
parse GNU objcopy's version string, not llvm-objcopy's, which triggers
the warning.

Commit 146117f2675d ("kbuild: thin archives make default for all archs")
made binutils 2.20 mandatory and commit 170156ccfc57 ("kbuild: check the
minimum assembler version in Kconfig") enforces this at configuration
time so just remove check_objcopy() and $can_use_local instead, assuming
--globalize-symbol is always available.

llvm-objcopy has supported --globalize-symbol since LLVM 7.0.0 in 2018
and the minimum version for building the kernel with LLVM is 10.0.1 so
there is no issue introduced:

Link: https://github.com/llvm/llvm-project/commit/ee5be798dae30d5f9414b01f76ff807edbc881aa
Link: https://lkml.kernel.org/r/20210802210307.3202472-1-nathan@kernel.org
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Makefile
scripts/recordmcount.pl