linux-stable/scripts
Javier Martinez Canillas ff2e6efda0 kbuild: Quote OBJCOPY var to avoid a pahole call break the build
The ccache tool can be used to speed up cross-compilation, by calling the
compiler and binutils through ccache. For example, following should work:

    $ export ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-"

    $ make M=drivers/gpu/drm/rockchip/

but pahole fails to extract the BTF info from DWARF, breaking the build:

      CC [M]  drivers/gpu/drm/rockchip//rockchipdrm.mod.o
      LD [M]  drivers/gpu/drm/rockchip//rockchipdrm.ko
      BTF [M] drivers/gpu/drm/rockchip//rockchipdrm.ko
    aarch64-linux-gnu-objcopy: invalid option -- 'J'
    Usage: aarch64-linux-gnu-objcopy [option(s)] in-file [out-file]
     Copies a binary file, possibly transforming it in the process
    ...
    make[1]: *** [scripts/Makefile.modpost:156: __modpost] Error 2
    make: *** [Makefile:1866: modules] Error 2

this fails because OBJCOPY is set to "ccache aarch64-linux-gnu-copy" and
later pahole is executed with the following command line:

    LLVM_OBJCOPY=$(OBJCOPY) $(PAHOLE) -J --btf_base vmlinux $@

which gets expanded to:

    LLVM_OBJCOPY=ccache aarch64-linux-gnu-objcopy pahole -J ...

instead of:

    LLVM_OBJCOPY="ccache aarch64-linux-gnu-objcopy" pahole -J ...

Fixes: 5f9ae91f7c ("kbuild: Build kernel module BTFs if BTF is enabled and pahole supports it")
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: https://lore.kernel.org/bpf/20210526215228.3729875-1-javierm@redhat.com
2021-05-27 11:32:56 -07:00
..
atomic
basic .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
clang-tools gen_compile_commands: prune some directories 2021-02-16 22:23:56 +09:00
coccinelle of: Remove of_dev_{get,put}() 2021-02-12 19:23:39 -06:00
dtc .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
dummy-tools kbuild: dummy-tools: adjust to stricter stackprotector check 2021-05-17 12:10:03 +09:00
gcc-plugins .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
gdb scripts/gdb: add lx_current support for arm64 2021-05-07 00:26:33 -07:00
genksyms .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
kconfig Kconfig updates for v5.13 2021-04-29 14:32:00 -07:00
ksymoops
mod .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
package kbuild: buildtar: add riscv support 2021-03-29 23:13:30 -07:00
selinux
tracing tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
adjust_autoksyms.sh kbuild: do not include include/config/auto.conf from adjust_autoksyms.sh 2021-02-28 15:22:02 +09:00
as-version.sh kbuild: check the minimum assembler version in Kconfig 2021-04-25 05:14:41 +09:00
asn1_compiler.c
bin2c.c
bloat-o-meter scripts: switch explicitly to Python 3 2021-01-22 06:34:44 +09:00
bootgraph.pl
bpf_doc.py scripts/bpf: Add syscall commands printer 2021-03-04 18:39:45 -08:00
cc-can-link.sh
cc-version.sh kbuild: collect minimum tool versions into scripts/min-tool-version.sh 2021-04-25 05:14:26 +09:00
check-sysctl-docs
check_extable.sh
checkdeclares.pl scripts: a new script for checking duplicate struct declaration 2021-04-30 11:20:35 -07:00
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl checkpatch: improve ALLOC_ARRAY_ARGS test 2021-05-06 19:24:13 -07:00
checkstack.pl
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
coccicheck scripts: coccicheck: Correct usage of make coccicheck 2020-12-24 12:59:43 +01:00
config kconfig: config script: add a little user help 2021-01-04 10:38:11 +09:00
const_structs.checkpatch
decode_stacktrace.sh
decodecode
depmod.sh depmod: handle the case of /sbin/depmod without /sbin in PATH 2021-01-01 12:26:39 -08:00
dev-needs.sh
diffconfig scripts: switch explicitly to Python 3 2021-01-22 06:34:44 +09:00
documentation-file-ref-check
export_report.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
extract_xc3028.pl
faddr2line
file-size.sh
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-x86_32-has-stack-protector.sh x86/stackprotector/32: Make the canary into a regular percpu variable 2021-03-08 13:19:05 +01:00
gcc-x86_64-has-stack-protector.sh
gen_autoksyms.sh kbuild: fix UNUSED_KSYMS_WHITELIST for Clang LTO 2021-02-28 15:19:21 +09:00
gen_ksymdeps.sh
generate_initcall_order.pl init: lto: ensure initcall ordering 2021-01-14 08:21:09 -08:00
get_abi.pl scripts: get_abi: ignore code blocks for cross-references 2021-03-31 13:53:16 -06:00
get_dvb_firmware
get_feat.pl scripts: get_feat.pl: reduce table width for all features output 2020-12-04 14:34:27 -07:00
get_maintainer.pl
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh
insert-sys-cert.c
jobserver-exec scripts/jobserver-exec: Fix a typo ("envirnoment") 2021-05-17 12:10:03 +09:00
kallsyms.c kallsyms: fix nonconverging kallsyms table with lld 2021-02-05 17:53:28 +09:00
Kbuild.include kbuild: split cc-option and friends to scripts/Makefile.compiler 2021-04-25 05:09:32 +09:00
Kconfig.include kbuild: check the minimum assembler version in Kconfig 2021-04-25 05:14:41 +09:00
kernel-doc kernel-doc: Add support for __deprecated 2021-04-27 09:59:04 -06:00
ld-version.sh kbuild: collect minimum tool versions into scripts/min-tool-version.sh 2021-04-25 05:14:26 +09:00
leaking_addresses.pl
Lindent
link-vmlinux.sh kbuild: Quote OBJCOPY var to avoid a pahole call break the build 2021-05-27 11:32:56 -07:00
Makefile Fix CVE-2020-26541 2021-04-26 08:38:10 -07:00
Makefile.asm-generic kbuild: prefix $(srctree)/ to some included Makefiles 2021-03-15 19:20:48 +09:00
Makefile.build kbuild: refactor fdtoverlay rule 2021-05-06 02:14:38 +09:00
Makefile.clean kbuild: prefix $(srctree)/ to some included Makefiles 2021-03-15 19:20:48 +09:00
Makefile.compiler kbuild: remove TMPO from try-run 2021-04-25 05:25:56 +09:00
Makefile.dtbinst kbuild: prefix $(srctree)/ to some included Makefiles 2021-03-15 19:20:48 +09:00
Makefile.extrawarn Makefile.extrawarn: remove -Wnested-externs warning 2020-12-08 23:30:05 +09:00
Makefile.gcc-plugins
Makefile.headersinst kbuild: prefix $(srctree)/ to some included Makefiles 2021-03-15 19:20:48 +09:00
Makefile.host
Makefile.kasan kasan: remove redundant config option 2021-04-16 16:10:36 -07:00
Makefile.kcov
Makefile.kcsan
Makefile.lib kbuild: refactor modname-multi by using suffix-search 2021-05-06 02:14:38 +09:00
Makefile.modfinal kbuild: Quote OBJCOPY var to avoid a pahole call break the build 2021-05-27 11:32:56 -07:00
Makefile.modinst kbuild: add support for zstd compressed modules 2021-04-25 05:25:06 +09:00
Makefile.modpost kbuild: fix false-positive modpost warning when all symbols are trimmed 2021-04-25 05:17:53 +09:00
Makefile.package kbuild: deb-pkg: change the source package name to linux-upstream 2021-04-25 05:30:45 +09:00
Makefile.ubsan ubsan: remove overflow checks 2021-02-26 09:41:05 -08:00
Makefile.userprogs
makelst
markup_oops.pl
min-tool-version.sh kbuild: collect minimum tool versions into scripts/min-tool-version.sh 2021-04-25 05:14:26 +09:00
mkcompile_h
mkmakefile
mksysmap
mkuboot.sh
module.lds.S module: ensure __cfi_check alignment 2021-04-08 16:04:21 -07:00
modules-check.sh kbuild: check module name conflict for external modules as well 2021-04-25 05:22:42 +09:00
nsdeps kbuild: replace LANG=C with LC_ALL=C 2021-05-02 00:43:35 +09:00
objdiff
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c ftrace: Have recordmcount use w8 to read relp->r_info in arm64_is_fake_mcount 2021-03-02 17:27:18 -05:00
recordmcount.h
recordmcount.pl Kbuild updates for v5.13 (2nd) 2021-05-08 10:00:11 -07:00
remove-stale-files kbuild: add a script to remove stale generated files 2021-05-02 00:43:35 +09:00
setlocalversion kbuild: replace LANG=C with LC_ALL=C 2021-05-02 00:43:35 +09:00
show_delta tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
sign-file.c
sorttable.c
sorttable.h
spdxcheck-test.sh
spdxcheck.py scripts/spdxcheck.py: Fix a typo 2021-03-28 14:41:49 +02:00
spelling.txt scripts/spelling.txt: add "overflw" 2021-05-07 00:26:34 -07:00
sphinx-pre-install docs: sphinx-pre-install: don't barf on beta Sphinx releases 2021-04-15 16:01:50 -06:00
split-man.pl tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
stackdelta
stackusage
subarch.include
syscallhdr.sh scripts: add generic syscallhdr.sh 2021-02-22 08:22:04 +09:00
syscalltbl.sh scripts: add generic syscalltbl.sh 2021-02-22 08:22:03 +09:00
tags.sh kbuild: replace LANG=C with LC_ALL=C 2021-05-02 00:43:35 +09:00
tools-support-relr.sh
unifdef.c
ver_linux Removed the oprofiled version option 2021-05-03 17:23:06 -06:00
xen-hypercalls.sh
xz_wrap.sh