Files
erofs-linux/scripts
Masahiro Yamada c6031b1dbb 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/[email protected]/

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Nicolas Schier <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Tested-by: Sedat Dilek <[email protected]> # LLVM-14 (x86-64)
2022-06-01 23:07:29 +09:00
..
2022-01-15 12:15:35 +01:00
2022-04-22 12:32:03 +02:00
…
…
…
…
2022-03-21 08:13:03 -07:00
…
…
2021-05-02 00:43:35 +09:00
…
2022-03-07 13:54:59 +01:00
2022-02-04 16:43:01 +01:00
…
2021-05-03 17:23:06 -06:00