diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-05-27 12:01:53 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2022-06-01 16:07:29 +0200 |
commit | c6031b1dbbbfec03891bf1baefa2e0803d705601 (patch) | |
tree | 173a64a7a43628e63041a824f6879811838b3460 /scripts/test_fortify.sh | |
parent | kbuild: make built-in.a rule robust against too long argument error (diff) | |
download | linux-c6031b1dbbbfec03891bf1baefa2e0803d705601.tar.xz linux-c6031b1dbbbfec03891bf1baefa2e0803d705601.zip |
kbuild: make *.mod rule robust against too long argument error
Like built-in.a, the command length of the *.mod rule scales with
the depth of the directory times the number of objects in the Makefile.
Add $(obj)/ by the shell command (awk) instead of by Make's builtin
function.
In-tree modules still have some room to the limit (ARG_MAX=2097152),
but this is more future-proof for big modules in a deep directory.
For example, you can build i915 as a module (CONFIG_DRM_I915=m) and
compare drivers/gpu/drm/i915/.i915.mod.cmd with/without this commit.
The issue is more critical for external modules because the M= path
can be very long as Jeff Johnson reported before [1].
[1] https://lore.kernel.org/linux-kbuild/4c02050c4e95e4cb8cc04282695f8404@codeaurora.org/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
Diffstat (limited to 'scripts/test_fortify.sh')
0 files changed, 0 insertions, 0 deletions