• Masahiro Yamada's avatar
    kbuild: factor out the common objtool arguments · b42d2306
    Masahiro Yamada authored
    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: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
    b42d2306
Makefile.lib 19.4 KB