Skip to content
Snippets Groups Projects
  1. Apr 28, 2024
  2. Apr 21, 2024
  3. Apr 14, 2024
  4. Apr 07, 2024
  5. Mar 31, 2024
  6. Mar 24, 2024
  7. Mar 10, 2024
  8. Mar 09, 2024
  9. Mar 03, 2024
  10. Feb 29, 2024
    • Miguel Ojeda's avatar
      kbuild: mark `rustc` (and others) invocations as recursive · ecab4115
      Miguel Ojeda authored
      `rustc` (like Cargo) may take advantage of the jobserver at any time
      (e.g. for backend parallelism, or eventually frontend too). In the kernel,
      we call `rustc` with `-Ccodegen-units=1` (and `-Zthreads` is 1 so far),
      so we do not expect parallelism. However, in the upcoming Rust 1.76.0, a
      warning is emitted by `rustc` [1] when it cannot connect to the jobserver
      it was passed (in many cases, but not all: compiling and `--print sysroot`
      do, but `--version` does not). And given GNU Make always passes
      the jobserver in the environment variable (even when a line is deemed
      non-recursive), `rustc` will end up complaining about it (in particular
      in Make 4.3 where there is only the simple pipe jobserver style).
      
      One solution is to remove the jobserver from `MAKEFLAGS`. However, we
      can mark the lines with calls to `rustc` (and Cargo) as recursive, which
      looks simpler. This is being documented as a recommendation in `rustc`
      [2] and allows us to be ready for the time we may use parallelism inside
      `rustc` (potentially now, if a user passes `-Zthreads`). Thus do so.
      
      Similarly, do the same for `rustdoc` and `cargo` calls.
      
      Finally, there is one case that the solution does not cover, which is the
      `$(shell ...)` call we have. Thus, for that one, set an empty `MAKEFLAGS`
      environment variable.
      
      Link: https://github.com/rust-lang/rust/issues/120515
      
       [1]
      Acked-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Link: https://github.com/rust-lang/rust/pull/121564 [2]
      Link: https://lore.kernel.org/r/20240217002638.57373-1-ojeda@kernel.org
      
      
      [ Reworded to add link to PR documenting the recommendation. ]
      Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      ecab4115
  11. Feb 25, 2024
  12. Feb 22, 2024
    • Nathan Chancellor's avatar
      Makefile: drop warn-stack-size plugin opt · c6d9a4a9
      Nathan Chancellor authored
      Now that the minimum supported version of LLVM for building the kernel has
      been bumped to 13.0.1, the inner ifeq statement is always false, as the
      build will fail during the configuration stage for older LLVM versions.
      
      This effectively reverts commit 24845dcb ("Makefile: LTO: have linker
      check -Wframe-larger-than") and its follow up fix, commit 0236526d
      ("Makefile: lto: Pass -warn-stack-size only on LLD < 13.0.0").
      
      Link: https://lkml.kernel.org/r/20240125-bump-min-llvm-ver-to-13-0-1-v1-2-f5ff9bda41c5@kernel.org
      
      
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: "Aneesh Kumar K.V (IBM)" <aneesh.kumar@kernel.org>
      Cc: Ard Biesheuvel <ardb@kernel.org>
      Cc: Borislav Petkov (AMD) <bp@alien8.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Conor Dooley <conor@kernel.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Nicolas Schier <nicolas@fjasle.eu>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      c6d9a4a9
  13. Feb 19, 2024
    • Masahiro Yamada's avatar
      kbuild: simplify dtbs_install by reading the list of compiled DTBs · 8f66864c
      Masahiro Yamada authored
      
      Retrieve the list of *.dtb(o) files from arch/*/boot/dts/dtbs-list
      instead of traversing the directory tree again.
      
      Please note that 'make dtbs_install' installs *.dtb(o) files directly
      added to dtb-y because scripts/Makefile.dtbinst installs $(dtb-y)
      without expanding the -dtbs suffix.
      
      This commit preserves this behavior.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      8f66864c
    • Masahiro Yamada's avatar
      kbuild: create a list of all built DTB files · 24507871
      Masahiro Yamada authored
      
      It is useful to have a list of all *.dtb and *.dtbo files generated
      from the current build.
      
      With this commit, 'make dtbs' creates arch/*/boot/dts/dtbs-list, which
      lists the dtb(o) files created in the current build. It maintains the
      order of the dtb-y additions in Makefiles although the order is not
      important for DTBs. It is a (good) side effect through the reuse of the
      modules.order rule.
      
      Please note this list only includes the files directly added to dtb-y.
      
      For example, consider this case:
      
          foo-dtbs := foo_base.dtb foo_overlay.dtbo
          dtb-y := foo.dtb
      
      In this example, the list will include foo.dtb, but not foo_base.dtb
      or foo_overlay.dtbo.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      24507871
  14. Feb 18, 2024
  15. Feb 14, 2024
  16. Feb 11, 2024
  17. Feb 09, 2024
  18. Feb 04, 2024
  19. Jan 31, 2024
  20. Jan 29, 2024
  21. Jan 21, 2024
  22. Jan 07, 2024
  23. Dec 31, 2023
  24. Dec 29, 2023
    • Masahiro Yamada's avatar
      kbuild: resolve symlinks for O= properly · 7beba04e
      Masahiro Yamada authored
      
      Currently, Kbuild follows the logical chain of directories for the O=
      option, just like 'cd' (or 'realpath --logical') does.
      
      Example:
      
          $ mkdir -p /tmp/a /tmp/x/y
          $ ln -s /tmp/x/y /tmp/a/b
          $ realpath /tmp/a/b/..
          /tmp/x
          $ realpath --logical /tmp/a/b/..
          /tmp/a
          $ make O=/tmp/a/b/.. defconfig
          make[1]: Entering directory '/tmp/a'
            [snip]
          make[1]: Leaving directory '/tmp/a'
      
      'make O=/tmp/a/b/.. defconfig' creates the kernel configuration in
      /tmp/a instead of /tmp/x despite /tmp/a/b/.. resolves to /tmp/x.
      
      This is because Kbuild internally uses the 'cd ... && pwd' for the
      path resolution, but this behavior is not predictable for users.
      Additionally, it is not consistent with how the Kbuild handles the
      M= option or GNU Make works with 'make -C /tmp/a/b/..'.
      
      Using the physical directory structure for the O= option seems more
      reasonable.
      
      The comment says "expand a shell special character '~'", but it has
      already been expanded to the home directory in the command line.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <n.schier@avm.de>
      7beba04e
  25. Dec 24, 2023
  26. Dec 17, 2023
  27. Dec 11, 2023
  28. Dec 10, 2023
  29. Dec 03, 2023
    • Linus Torvalds's avatar
      Linux 6.7-rc4 · 33cc938e
      Linus Torvalds authored
      v6.7-rc4
      33cc938e
    • Masahiro Yamada's avatar
      kbuild: support W=c and W=e shorthands for Kconfig · 92ef432f
      Masahiro Yamada authored
      
      KCONFIG_WARN_UNKNOWN_SYMBOLS=1 and KCONFIG_WERROR=1 are descriptive
      and suitable in scripting, but typing them from the command line can
      be tedious.
      
      Associate them with KBUILD_EXTRA_WARN (and the W= shorthand).
      
      Support a new letter 'c' to enable extra checks in Kconfig. You can
      still manage compiler warnings (W=1) and Kconfig warnings (W=c)
      independently.
      
      Reuse the letter 'e' to turn Kconfig warnings into errors.
      
      As usual, you can combine multiple letters in KCONFIG_EXTRA_WARN.
      
        $ KCONFIG_WARN_UNKNOWN_SYMBOLS=1 KCONFIG_WERROR=1 make defconfig
      
      can be shortened to:
      
        $ KBUILD_EXTRA_WARN=ce make defconfig
      
      or, even shorter:
      
        $ make W=ce defconfig
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
      92ef432f
  30. Nov 28, 2023
  31. Nov 27, 2023
  32. Nov 19, 2023
  33. Nov 13, 2023
Loading