Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • scripts
  • Makefile.build
Find file BlameHistoryPermalink
  • Masahiro Yamada's avatar
    kbuild: make *.mod rule robust against too long argument error · c6031b1d
    Masahiro Yamada authored May 27, 2022
    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: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
    Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
    Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
    c6031b1d
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7