]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: factor out the common objtool arguments
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 28 May 2022 15:47:04 +0000 (00:47 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 4 Jun 2022 21:20:57 +0000 (06:20 +0900)
commitd6295e499230df91155f1d2167fa3007b4cf3b12
tree89a23a22dc7f90aacedb20c60f53723dd72ea562
parentb3ba9d3efa488a9bd402e71e921c172c0d254898
kbuild: factor out the common objtool arguments

scripts/Makefile.build and scripts/link-vmlinux.sh have similar setups
for the objtool arguments.

It was difficult to factor out them because all the vmlinux build rules
were written in a shell script. It is somewhat tedious to touch the two
files every time a new objtool option is supported.

To reduce the code duplication, move the objtool for vmlinux.o into
scripts/Makefile.vmlinux_o. Then, move the common macros to Makefile.lib
so they are shared between Makefile.build and Makefile.vmlinux_o.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
scripts/Makefile.build
scripts/Makefile.lib
scripts/Makefile.vmlinux_o
scripts/link-vmlinux.sh