Skip to content
Snippets Groups Projects
  1. May 12, 2024
  2. May 05, 2024
  3. Apr 28, 2024
  4. Apr 21, 2024
  5. Apr 14, 2024
  6. Apr 07, 2024
  7. Mar 31, 2024
  8. Mar 24, 2024
  9. Mar 10, 2024
  10. Mar 09, 2024
  11. Mar 03, 2024
  12. 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
  13. Feb 25, 2024
    • Linus Torvalds's avatar
      Linux 6.8-rc6 · d206a76d
      Linus Torvalds authored
      d206a76d
    • Petr Pavlu's avatar
      kbuild: Use -fmin-function-alignment when available · 5270316c
      Petr Pavlu authored
      
      GCC recently added option -fmin-function-alignment, which should appear
      in GCC 14. Unlike -falign-functions, this option causes all functions to
      be aligned at the specified value, including the cold ones.
      
      In particular, when an arm64 kernel is built with
      DYNAMIC_FTRACE_WITH_CALL_OPS=y, the 8-byte function alignment is
      required for correct functionality. This was done by -falign-functions=8
      and having workarounds in the kernel to force the compiler to follow
      this alignment. The new -fmin-function-alignment option directly
      guarantees it.
      
      Detect availability of -fmin-function-alignment and use it instead of
      -falign-functions when present. Introduce CC_HAS_SANE_FUNCTION_ALIGNMENT
      and enable __cold to work as expected when it is set.
      
      Signed-off-by: default avatarPetr Pavlu <petr.pavlu@suse.com>
      Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      5270316c
  14. 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
  15. 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
  16. Feb 18, 2024
  17. Feb 14, 2024
  18. Feb 11, 2024
  19. Feb 09, 2024
  20. Feb 04, 2024
  21. Jan 31, 2024
  22. Jan 29, 2024
  23. Jan 21, 2024
  24. Jan 07, 2024
  25. Dec 31, 2023
  26. 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
  27. Dec 24, 2023
  28. Dec 17, 2023
  29. Dec 11, 2023
  30. Dec 10, 2023
  31. 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
  32. Nov 28, 2023
  33. Nov 27, 2023
Loading