]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: do not try to parse *.cmd files for objects provided by compiler
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 29 May 2022 04:23:18 +0000 (13:23 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 29 May 2022 09:36:41 +0000 (18:36 +0900)
commitab106ff162f7d5ed0c764d02f742ee24817ca296
tree3777b900aed2768d4e9f44eed1b4bf436df5962d
parente49a802ed5b79d97299a3a2c4c01755f96674a95
kbuild: do not try to parse *.cmd files for objects provided by compiler

Guenter Roeck reported the build breakage for parisc and csky.
I confirmed nios2 and openrisc are broken as well.

The reason is that they borrow libgcc.a from the toolchains.

For example, see this line in arch/parisc/Makefile:

    LIBGCC          := $(shell $(CC) -print-libgcc-file-name)

Some objects in libgcc.a are linked to vmlinux.o, but they do not have
.*.cmd files.

Obviously, there is no EXPORT_SYMBOL in external objects. Ignore them.

(Most of the architectures import library code into the kernel tree.
Perhaps those 4 architectures can do similar, but I do not know how
challenging it is.)

Fixes: 89d0074c4cc6 ("modpost: extract symbol versions from *.cmd files")
Link: https://lore.kernel.org/linux-kbuild/20220528224745.GA2501857@roeck-us.net/T/#mac65c20c71c3e272db0350ecfba53fcd8905b0a0
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
scripts/link-vmlinux.sh