linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] Kbuild fixes for v6.8-rc3
@ 2024-02-01 13:39 Masahiro Yamada
  2024-02-01 20:06 ` Linus Torvalds
  2024-02-01 21:02 ` pr-tracker-bot
  0 siblings, 2 replies; 8+ messages in thread
From: Masahiro Yamada @ 2024-02-01 13:39 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, Linux Kbuild mailing list

Hello Linus,


Please pull Kbuild fixes for v6.8-rc3.
Thanks.


The following changes since commit 6613476e225e090cc9aad49be7fa504e290dd33d:

  Linux 6.8-rc1 (2024-01-21 14:11:32 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
tags/kbuild-fixes-v6.8

for you to fetch changes up to bfef491df67022c56aab3b831044f8d259f9441f:

  kconfig: initialize sym->curr.tri to 'no' for all symbol types again
(2024-01-31 23:59:42 +0900)

----------------------------------------------------------------
Kbuild fixes for v6.8

 - Fix UML build with clang-18 and newer

 - Avoid using the alias attribute in host programs

 - Replace tabs with spaces when followed by conditionals for
   future GNU Make versions

 - Fix rpm-pkg for the systemd-provided kernel-install tool

 - Fix the undefined behavior in Kconfig for a 'int' symbol used in a
   conditional

----------------------------------------------------------------
Dmitry Goncharov (1):
      kbuild: Replace tabs with spaces when followed by conditionals

Jose Ignacio Tornos Martinez (1):
      kbuild: rpm-pkg: simplify installkernel %post

Masahiro Yamada (3):
      kbuild: fix W= flags in the help message
      modpost: avoid using the alias attribute
      kconfig: initialize sym->curr.tri to 'no' for all symbol types again

Nathan Chancellor (2):
      um: Fix adding '-no-pie' for clang
      modpost: Add '.ltext' and '.ltext.*' to TEXT_SECTIONS

Zhang Bingwu (1):
      kbuild: defconf: use SRCARCH to find merged configs

 Makefile                    | 14 +++++++-------
 arch/m68k/Makefile          |  4 ++--
 arch/parisc/Makefile        |  4 ++--
 arch/um/Makefile            |  4 +++-
 arch/x86/Makefile           | 10 +++++-----
 scripts/Makefile.defconf    |  8 ++++----
 scripts/kconfig/symbol.c    |  4 +++-
 scripts/mod/modpost.c       | 15 +++------------
 scripts/mod/modpost.h       |  6 +-----
 scripts/package/kernel.spec | 22 +++++++++++-----------
 10 files changed, 41 insertions(+), 50 deletions(-)


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] Kbuild fixes for v6.8-rc3
  2024-02-01 13:39 [GIT PULL] Kbuild fixes for v6.8-rc3 Masahiro Yamada
@ 2024-02-01 20:06 ` Linus Torvalds
  2024-02-01 23:57   ` Masahiro Yamada
  2024-02-01 21:02 ` pr-tracker-bot
  1 sibling, 1 reply; 8+ messages in thread
From: Linus Torvalds @ 2024-02-01 20:06 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Linux Kernel Mailing List, Linux Kbuild mailing list

On Thu, 1 Feb 2024 at 05:40, Masahiro Yamada <masahiroy@kernel.org> wrote:
>
>  - Replace tabs with spaces when followed by conditionals for
>    future GNU Make versions

This is horrid.

Now, the whole "whitespace type matters" is broken in Make anyway, so
clearly this is a fundamental make problem, but this commit makes
things worse by making the tab replacement use eight spaces, so it
really visually is entirely indistinguishable.

Don't make a 'make' problem worse by not visually distinguishing tabs
from spaces.

IOW, those "that can't be a tab" cases should have used pretty much
_anything_ but 8 spaces. Yes on indentation of nested 'if' statements,
but no on then using something that visually makes no sense.

IOW, those nested if-statements should use perhaps just 2-4 spaces
instead. That tends to match what we sometimes see in C files too, and
it is visually very clearly not a tab with the kernel coding rules
(yes, yes, some people set tabstops to smaller values, that's _their_
problem).

I've pulled this, but please fix it, and don't make an insane Makefile
whitespace situation worse.

                Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] Kbuild fixes for v6.8-rc3
  2024-02-01 13:39 [GIT PULL] Kbuild fixes for v6.8-rc3 Masahiro Yamada
  2024-02-01 20:06 ` Linus Torvalds
@ 2024-02-01 21:02 ` pr-tracker-bot
  1 sibling, 0 replies; 8+ messages in thread
From: pr-tracker-bot @ 2024-02-01 21:02 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linus Torvalds, Linux Kernel Mailing List, Linux Kbuild mailing list

The pull request you sent on Thu, 1 Feb 2024 22:39:45 +0900:

> git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git tags/kbuild-fixes-v6.8

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a412682659b3832ac6f1a301e1c147027926f605

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] Kbuild fixes for v6.8-rc3
  2024-02-01 20:06 ` Linus Torvalds
@ 2024-02-01 23:57   ` Masahiro Yamada
  2024-02-02  0:43     ` Linus Torvalds
  0 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2024-02-01 23:57 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, Linux Kbuild mailing list

[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]

Hi Linus,


On Fri, Feb 2, 2024 at 5:06 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Thu, 1 Feb 2024 at 05:40, Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> >  - Replace tabs with spaces when followed by conditionals for
> >    future GNU Make versions
>
> This is horrid.
>
> Now, the whole "whitespace type matters" is broken in Make anyway, so
> clearly this is a fundamental make problem, but this commit makes
> things worse by making the tab replacement use eight spaces, so it
> really visually is entirely indistinguishable.
>
> Don't make a 'make' problem worse by not visually distinguishing tabs
> from spaces.
>
> IOW, those "that can't be a tab" cases should have used pretty much
> _anything_ but 8 spaces. Yes on indentation of nested 'if' statements,
> but no on then using something that visually makes no sense.
>
> IOW, those nested if-statements should use perhaps just 2-4 spaces
> instead. That tends to match what we sometimes see in C files too, and
> it is visually very clearly not a tab with the kernel coding rules
> (yes, yes, some people set tabstops to smaller values, that's _their_
> problem).
>
> I've pulled this, but please fix it, and don't make an insane Makefile
> whitespace situation worse.
>
>                 Linus




Personally, I find 4 spaces more comfortable than 2, as the increased
indentation enhances readability.

When we have a build rule inside an if-block, we cannot indent the code.
In such cases, we can add a comment after the closing 'endif' if it
helps improve the readability, just like we often do for preprocessor
conditionals in C files.


So, the best consistency we can achieve is a combination of
"4-space indentation" and "no indentation at all".

I attached a patch to replace tab/8-space indentation.

Probably, there are still unconverted conditionals, but I fixed
all the code blocks touched by commit 82175d1f9430.

Is this your expectation?






-- 
Best Regards
Masahiro Yamada

[-- Attachment #2: 0001-Makefile-replace-tab-8-space-indentation-with-4-spac.patch --]
[-- Type: text/x-patch, Size: 24924 bytes --]

From 4bd029eff6e0a88d72e05cc0a962af23b735fef8 Mon Sep 17 00:00:00 2001
From: Masahiro Yamada <masahiroy@kernel.org>
Date: Fri, 2 Feb 2024 06:23:44 +0900
Subject: [PATCH] Makefile: replace tab/8-space indentation with 4-space
 indentation

We cannot use tab-indentation in nested if-blocks for the reason
described in commit 82175d1f9430 ("kbuild: Replace tabs with spaces
when followed by conditionals").

Technically, only tabs followed by conditionals matter, but it is not
a good idea to mix tab indentation and 8-space indentation within the
same if-block.

Linus suggested 2 or 4 spaces for nested if-blocks. [1]

This commit replaces a tab with 4 spaces in if-blocks including unnested
ones. Otherwise, someone may accidentally append a conditional after a
tab. Also, 8 spaces, which cannot be visually distinguished, should be
replaced with 4 spaces.

[1]: https://lore.kernel.org/all/CAHk-=whJKZNZWsa-VNDKafS_VfY4a5dAjG-r8BZgWk_a-xSepw@mail.gmail.com/

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
 Makefile                       |  84 ++++++++++----------
 arch/m68k/Makefile             |   8 +-
 arch/mips/Makefile             |   4 +-
 arch/openrisc/Makefile         |  16 ++--
 arch/parisc/Makefile           |  20 ++---
 arch/powerpc/Makefile          |   8 +-
 arch/riscv/Makefile            |  56 +++++++-------
 arch/sparc/Makefile            |   4 +-
 arch/um/Makefile               |   4 +-
 arch/x86/Makefile              | 136 ++++++++++++++++-----------------
 tools/scripts/Makefile.arch    |  12 +--
 tools/scripts/Makefile.include |  64 ++++++++--------
 12 files changed, 208 insertions(+), 208 deletions(-)

diff --git a/Makefile b/Makefile
index 113f7c762f0a..f2bd75b07ddf 100644
--- a/Makefile
+++ b/Makefile
@@ -245,17 +245,17 @@ else # need-sub-make
 # We process the rest of the Makefile if this is the final invocation of make
 
 ifeq ($(abs_srctree),$(abs_objtree))
-        # building in the source tree
-        srctree := .
-	building_out_of_srctree :=
+    # building in the source tree
+    srctree := .
+    building_out_of_srctree :=
 else
-        ifeq ($(abs_srctree)/,$(dir $(abs_objtree)))
-                # building in a subdirectory of the source tree
-                srctree := ..
-        else
-                srctree := $(abs_srctree)
-        endif
-	building_out_of_srctree := 1
+    ifeq ($(abs_srctree)/,$(dir $(abs_objtree)))
+        # building in a subdirectory of the source tree
+        srctree := ..
+    else
+        srctree := $(abs_srctree)
+    endif
+    building_out_of_srctree := 1
 endif
 
 ifneq ($(KBUILD_ABS_SRCTREE),)
@@ -294,52 +294,52 @@ may-sync-config	:= 1
 single-build	:=
 
 ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
-        ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
-		need-config :=
-        endif
+    ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
+        need-config :=
+    endif
 endif
 
 ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
-        ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
-		may-sync-config :=
-        endif
+    ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
+        may-sync-config :=
+    endif
 endif
 
 need-compiler := $(may-sync-config)
 
 ifneq ($(KBUILD_EXTMOD),)
-	may-sync-config :=
+    may-sync-config :=
 endif
 
 ifeq ($(KBUILD_EXTMOD),)
-        ifneq ($(filter %config,$(MAKECMDGOALS)),)
-		config-build := 1
-                ifneq ($(words $(MAKECMDGOALS)),1)
-			mixed-build := 1
-                endif
+    ifneq ($(filter %config,$(MAKECMDGOALS)),)
+        config-build := 1
+        ifneq ($(words $(MAKECMDGOALS)),1)
+            mixed-build := 1
         endif
+    endif
 endif
 
 # We cannot build single targets and the others at the same time
 ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
-	single-build := 1
-        ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
-		mixed-build := 1
-        endif
+    single-build := 1
+    ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
+        mixed-build := 1
+    endif
 endif
 
 # For "make -j clean all", "make -j mrproper defconfig all", etc.
 ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),)
-        ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),)
-		mixed-build := 1
-        endif
+    ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),)
+        mixed-build := 1
+    endif
 endif
 
 # install and modules_install need also be processed one by one
 ifneq ($(filter install,$(MAKECMDGOALS)),)
-        ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
-		mixed-build := 1
-        endif
+    ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
+        mixed-build := 1
+    endif
 endif
 
 ifdef mixed-build
@@ -395,23 +395,23 @@ SRCARCH 	:= $(ARCH)
 
 # Additional ARCH settings for x86
 ifeq ($(ARCH),i386)
-        SRCARCH := x86
+    SRCARCH := x86
 endif
 ifeq ($(ARCH),x86_64)
-        SRCARCH := x86
+    SRCARCH := x86
 endif
 
 # Additional ARCH settings for sparc
 ifeq ($(ARCH),sparc32)
-       SRCARCH := sparc
+    SRCARCH := sparc
 endif
 ifeq ($(ARCH),sparc64)
-       SRCARCH := sparc
+    SRCARCH := sparc
 endif
 
 # Additional ARCH settings for parisc
 ifeq ($(ARCH),parisc64)
-       SRCARCH := parisc
+    SRCARCH := parisc
 endif
 
 export cross_compiling :=
@@ -580,15 +580,15 @@ KBUILD_LDFLAGS :=
 CLANG_FLAGS :=
 
 ifeq ($(KBUILD_CLIPPY),1)
-	RUSTC_OR_CLIPPY_QUIET := CLIPPY
-	RUSTC_OR_CLIPPY = $(CLIPPY_DRIVER)
+    RUSTC_OR_CLIPPY_QUIET := CLIPPY
+    RUSTC_OR_CLIPPY = $(CLIPPY_DRIVER)
 else
-	RUSTC_OR_CLIPPY_QUIET := RUSTC
-	RUSTC_OR_CLIPPY = $(RUSTC)
+    RUSTC_OR_CLIPPY_QUIET := RUSTC
+    RUSTC_OR_CLIPPY = $(RUSTC)
 endif
 
 ifdef RUST_LIB_SRC
-	export RUST_LIB_SRC
+    export RUST_LIB_SRC
 endif
 
 # Allows the usage of unstable features in stable compilers.
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index 76ef1a67c361..21fb2ee78e69 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -15,10 +15,10 @@
 KBUILD_DEFCONFIG := multi_defconfig
 
 ifdef cross_compiling
-        ifeq ($(CROSS_COMPILE),)
-		CROSS_COMPILE := $(call cc-cross-prefix, \
-			m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
-        endif
+    ifeq ($(CROSS_COMPILE),)
+        CROSS_COMPILE := $(call cc-cross-prefix, \
+                           m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
+    endif
 endif
 
 #
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index f49807e1f19b..409c4c44626e 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -317,9 +317,9 @@ endif
 # remove the upper 32 bits then, as it is safe to do so with other
 # linkers.
 ifdef CONFIG_64BIT
-	load-ld			= $(load-y)
+    load-ld			= $(load-y)
 else
-	load-ld			= $(subst 0xffffffff,0x,$(load-y))
+    load-ld			= $(subst 0xffffffff,0x,$(load-y))
 endif
 
 KBUILD_AFLAGS	+= $(cflags-y)
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
index 68249521db5a..027f9e77ff6c 100644
--- a/arch/openrisc/Makefile
+++ b/arch/openrisc/Makefile
@@ -28,31 +28,31 @@ all: vmlinux.bin
 boot := arch/$(ARCH)/boot
 
 ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y)
-	KBUILD_CFLAGS += $(call cc-option,-mhard-mul)
+    KBUILD_CFLAGS += $(call cc-option,-mhard-mul)
 else
-	KBUILD_CFLAGS += $(call cc-option,-msoft-mul)
+    KBUILD_CFLAGS += $(call cc-option,-msoft-mul)
 endif
 
 ifeq ($(CONFIG_OPENRISC_HAVE_INST_DIV),y)
-	KBUILD_CFLAGS += $(call cc-option,-mhard-div)
+    KBUILD_CFLAGS += $(call cc-option,-mhard-div)
 else
-	KBUILD_CFLAGS += $(call cc-option,-msoft-div)
+    KBUILD_CFLAGS += $(call cc-option,-msoft-div)
 endif
 
 ifeq ($(CONFIG_OPENRISC_HAVE_INST_CMOV),y)
-	KBUILD_CFLAGS += $(call cc-option,-mcmov)
+    KBUILD_CFLAGS += $(call cc-option,-mcmov)
 endif
 
 ifeq ($(CONFIG_OPENRISC_HAVE_INST_ROR),y)
-	KBUILD_CFLAGS += $(call cc-option,-mror)
+    KBUILD_CFLAGS += $(call cc-option,-mror)
 endif
 
 ifeq ($(CONFIG_OPENRISC_HAVE_INST_RORI),y)
-	KBUILD_CFLAGS += $(call cc-option,-mrori)
+    KBUILD_CFLAGS += $(call cc-option,-mrori)
 endif
 
 ifeq ($(CONFIG_OPENRISC_HAVE_INST_SEXT),y)
-	KBUILD_CFLAGS += $(call cc-option,-msext)
+    KBUILD_CFLAGS += $(call cc-option,-msext)
 endif
 
 libs-y		+= $(LIBGCC)
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 7486b3b30594..70e7f8ce16ef 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -30,11 +30,11 @@ endif
 
 # select defconfig based on actual architecture
 ifeq ($(ARCH),parisc64)
-	KBUILD_DEFCONFIG := generic-64bit_defconfig
-	CC_ARCHES := hppa64
+    KBUILD_DEFCONFIG := generic-64bit_defconfig
+    CC_ARCHES := hppa64
 else
-	KBUILD_DEFCONFIG := generic-32bit_defconfig
-	CC_ARCHES := hppa hppa2.0 hppa1.1
+    KBUILD_DEFCONFIG := generic-32bit_defconfig
+    CC_ARCHES := hppa hppa2.0 hppa1.1
 endif
 
 export LD_BFD
@@ -50,12 +50,12 @@ export CROSS32CC
 
 # Set default cross compiler for kernel build
 ifdef cross_compiling
-        ifeq ($(CROSS_COMPILE),)
-		CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
-		CROSS_COMPILE := $(call cc-cross-prefix, \
-			$(foreach a,$(CC_ARCHES), \
-			$(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
-        endif
+    ifeq ($(CROSS_COMPILE),)
+        CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
+        CROSS_COMPILE := $(call cc-cross-prefix, \
+                             $(foreach a,$(CC_ARCHES), \
+                                 $(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
+    endif
 endif
 
 ifdef CONFIG_DYNAMIC_FTRACE
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 051247027da0..ef171bf5a1b1 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -43,9 +43,9 @@ endif
 export BITS
 
 ifdef CONFIG_PPC64
-        BITS := 64
+    BITS := 64
 else
-        BITS := 32
+    BITS := 32
 endif
 
 machine-y = ppc
@@ -186,8 +186,8 @@ CHECKFLAGS	+= -D__LITTLE_ENDIAN__
 endif
 
 ifdef CONFIG_476FPE_ERR46
-	KBUILD_LDFLAGS_MODULE += --ppc476-workaround \
-		-T $(srctree)/arch/powerpc/platforms/44x/ppc476_modules.lds
+    KBUILD_LDFLAGS_MODULE += --ppc476-workaround \
+        -T $(srctree)/arch/powerpc/platforms/44x/ppc476_modules.lds
 endif
 
 # No prefix or pcrel
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 0b7d109258e7..16acad5f66c2 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -8,17 +8,17 @@
 
 LDFLAGS_vmlinux := -z norelro
 ifeq ($(CONFIG_RELOCATABLE),y)
-	LDFLAGS_vmlinux += -shared -Bsymbolic -z notext --emit-relocs
-	KBUILD_CFLAGS += -fPIE
+    LDFLAGS_vmlinux += -shared -Bsymbolic -z notext --emit-relocs
+    KBUILD_CFLAGS += -fPIE
 endif
 ifeq ($(CONFIG_DYNAMIC_FTRACE),y)
-	LDFLAGS_vmlinux += --no-relax
-	KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY
-ifeq ($(CONFIG_RISCV_ISA_C),y)
-	CC_FLAGS_FTRACE := -fpatchable-function-entry=4
-else
-	CC_FLAGS_FTRACE := -fpatchable-function-entry=2
-endif
+    LDFLAGS_vmlinux += --no-relax
+    KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY
+    ifeq ($(CONFIG_RISCV_ISA_C),y)
+        CC_FLAGS_FTRACE := -fpatchable-function-entry=4
+    else
+        CC_FLAGS_FTRACE := -fpatchable-function-entry=2
+    endif
 endif
 
 ifeq ($(CONFIG_CMODEL_MEDLOW),y)
@@ -27,33 +27,33 @@ endif
 
 export BITS
 ifeq ($(CONFIG_ARCH_RV64I),y)
-	BITS := 64
-	UTS_MACHINE := riscv64
+    BITS := 64
+    UTS_MACHINE := riscv64
 
-	KBUILD_CFLAGS += -mabi=lp64
-	KBUILD_AFLAGS += -mabi=lp64
+    KBUILD_CFLAGS += -mabi=lp64
+    KBUILD_AFLAGS += -mabi=lp64
 
-	KBUILD_LDFLAGS += -melf64lriscv
+    KBUILD_LDFLAGS += -melf64lriscv
 else
-	BITS := 32
-	UTS_MACHINE := riscv32
+    BITS := 32
+    UTS_MACHINE := riscv32
 
-	KBUILD_CFLAGS += -mabi=ilp32
-	KBUILD_AFLAGS += -mabi=ilp32
-	KBUILD_LDFLAGS += -melf32lriscv
+    KBUILD_CFLAGS += -mabi=ilp32
+    KBUILD_AFLAGS += -mabi=ilp32
+    KBUILD_LDFLAGS += -melf32lriscv
 endif
 
 ifndef CONFIG_RISCV_USE_LINKER_RELAXATION
-	KBUILD_CFLAGS += -mno-relax
-	KBUILD_AFLAGS += -mno-relax
-ifndef CONFIG_AS_IS_LLVM
-	KBUILD_CFLAGS += -Wa,-mno-relax
-	KBUILD_AFLAGS += -Wa,-mno-relax
-endif
+    KBUILD_CFLAGS += -mno-relax
+    KBUILD_AFLAGS += -mno-relax
+    ifndef CONFIG_AS_IS_LLVM
+        KBUILD_CFLAGS += -Wa,-mno-relax
+        KBUILD_AFLAGS += -Wa,-mno-relax
+    endif
 endif
 
 ifeq ($(CONFIG_SHADOW_CALL_STACK),y)
-	KBUILD_LDFLAGS += --no-relax-gp
+    KBUILD_LDFLAGS += --no-relax-gp
 endif
 
 # ISA string setting
@@ -83,10 +83,10 @@ KBUILD_CFLAGS += -mno-save-restore
 KBUILD_CFLAGS += -DCONFIG_PAGE_OFFSET=$(CONFIG_PAGE_OFFSET)
 
 ifeq ($(CONFIG_CMODEL_MEDLOW),y)
-	KBUILD_CFLAGS += -mcmodel=medlow
+    KBUILD_CFLAGS += -mcmodel=medlow
 endif
 ifeq ($(CONFIG_CMODEL_MEDANY),y)
-	KBUILD_CFLAGS += -mcmodel=medany
+    KBUILD_CFLAGS += -mcmodel=medany
 endif
 
 # Avoid generating .eh_frame sections.
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index 5f6035936131..8bc4c9449a27 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -10,9 +10,9 @@
 
 # We are not yet configured - so test on arch
 ifeq ($(ARCH),sparc64)
-        KBUILD_DEFCONFIG := sparc64_defconfig
+    KBUILD_DEFCONFIG := sparc64_defconfig
 else
-        KBUILD_DEFCONFIG := sparc32_defconfig
+    KBUILD_DEFCONFIG := sparc32_defconfig
 endif
 
 ifeq ($(CONFIG_SPARC32),y)
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 34957dcb88b9..bc48647901d2 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -27,11 +27,11 @@ MODE_INCLUDE	+= -I$(srctree)/$(ARCH_DIR)/include/shared/skas
 HEADER_ARCH 	:= $(SUBARCH)
 
 ifneq ($(filter $(SUBARCH),x86 x86_64 i386),)
-	HEADER_ARCH := x86
+    HEADER_ARCH := x86
 endif
 
 ifdef CONFIG_64BIT
-	KBUILD_CFLAGS += -mcmodel=large
+    KBUILD_CFLAGS += -mcmodel=large
 endif
 
 HOST_DIR := arch/$(HEADER_ARCH)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 2264db14a25d..c9c34fe9c899 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -87,87 +87,87 @@ KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
 endif
 
 ifeq ($(CONFIG_X86_32),y)
-        BITS := 32
-        UTS_MACHINE := i386
-        CHECKFLAGS += -D__i386__
+    BITS := 32
+    UTS_MACHINE := i386
+    CHECKFLAGS += -D__i386__
 
-        KBUILD_AFLAGS += -m32
-        KBUILD_CFLAGS += -m32
+    KBUILD_AFLAGS += -m32
+    KBUILD_CFLAGS += -m32
 
-        KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return
+    KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return
 
-        # Never want PIC in a 32-bit kernel, prevent breakage with GCC built
-        # with nonstandard options
-        KBUILD_CFLAGS += -fno-pic
+    # Never want PIC in a 32-bit kernel, prevent breakage with GCC built
+    # with nonstandard options
+    KBUILD_CFLAGS += -fno-pic
 
-        # Align the stack to the register width instead of using the default
-        # alignment of 16 bytes. This reduces stack usage and the number of
-        # alignment instructions.
-        KBUILD_CFLAGS += $(cc_stack_align4)
+    # Align the stack to the register width instead of using the default
+    # alignment of 16 bytes. This reduces stack usage and the number of
+    # alignment instructions.
+    KBUILD_CFLAGS += $(cc_stack_align4)
 
-        # CPU-specific tuning. Anything which can be shared with UML should go here.
-        include $(srctree)/arch/x86/Makefile_32.cpu
-        KBUILD_CFLAGS += $(cflags-y)
+    # CPU-specific tuning. Anything which can be shared with UML should go here.
+    include $(srctree)/arch/x86/Makefile_32.cpu
+    KBUILD_CFLAGS += $(cflags-y)
 
-        # temporary until string.h is fixed
-        KBUILD_CFLAGS += -ffreestanding
+    # temporary until string.h is fixed
+    KBUILD_CFLAGS += -ffreestanding
 
-        ifeq ($(CONFIG_STACKPROTECTOR),y)
-                ifeq ($(CONFIG_SMP),y)
-			KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard
-                else
-			KBUILD_CFLAGS += -mstack-protector-guard=global
-                endif
+    ifeq ($(CONFIG_STACKPROTECTOR),y)
+        ifeq ($(CONFIG_SMP),y)
+            KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard
+        else
+            KBUILD_CFLAGS += -mstack-protector-guard=global
         endif
+    endif
 else
-        BITS := 64
-        UTS_MACHINE := x86_64
-        CHECKFLAGS += -D__x86_64__
+    BITS := 64
+    UTS_MACHINE := x86_64
+    CHECKFLAGS += -D__x86_64__
 
-        KBUILD_AFLAGS += -m64
-        KBUILD_CFLAGS += -m64
+    KBUILD_AFLAGS += -m64
+    KBUILD_CFLAGS += -m64
 
-        # Align jump targets to 1 byte, not the default 16 bytes:
-        KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1)
+    # Align jump targets to 1 byte, not the default 16 bytes:
+    KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1)
 
-        # Pack loops tightly as well:
-        KBUILD_CFLAGS += $(call cc-option,-falign-loops=1)
+    # Pack loops tightly as well:
+    KBUILD_CFLAGS += $(call cc-option,-falign-loops=1)
 
-        # Don't autogenerate traditional x87 instructions
-        KBUILD_CFLAGS += -mno-80387
-        KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
+    # Don't autogenerate traditional x87 instructions
+    KBUILD_CFLAGS += -mno-80387
+    KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
 
-        # By default gcc and clang use a stack alignment of 16 bytes for x86.
-        # However the standard kernel entry on x86-64 leaves the stack on an
-        # 8-byte boundary. If the compiler isn't informed about the actual
-        # alignment it will generate extra alignment instructions for the
-        # default alignment which keep the stack *mis*aligned.
-        # Furthermore an alignment to the register width reduces stack usage
-        # and the number of alignment instructions.
-        KBUILD_CFLAGS += $(cc_stack_align8)
+    # By default gcc and clang use a stack alignment of 16 bytes for x86.
+    # However the standard kernel entry on x86-64 leaves the stack on an
+    # 8-byte boundary. If the compiler isn't informed about the actual
+    # alignment it will generate extra alignment instructions for the
+    # default alignment which keep the stack *mis*aligned.
+    # Furthermore an alignment to the register width reduces stack usage
+    # and the number of alignment instructions.
+    KBUILD_CFLAGS += $(cc_stack_align8)
 
-	# Use -mskip-rax-setup if supported.
-	KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
+    # Use -mskip-rax-setup if supported.
+    KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
 
-        # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
-        cflags-$(CONFIG_MK8)		+= -march=k8
-        cflags-$(CONFIG_MPSC)		+= -march=nocona
-        cflags-$(CONFIG_MCORE2)		+= -march=core2
-        cflags-$(CONFIG_MATOM)		+= -march=atom
-        cflags-$(CONFIG_GENERIC_CPU)	+= -mtune=generic
-        KBUILD_CFLAGS += $(cflags-y)
+    # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
+    cflags-$(CONFIG_MK8)		+= -march=k8
+    cflags-$(CONFIG_MPSC)		+= -march=nocona
+    cflags-$(CONFIG_MCORE2)		+= -march=core2
+    cflags-$(CONFIG_MATOM)		+= -march=atom
+    cflags-$(CONFIG_GENERIC_CPU)	+= -mtune=generic
+    KBUILD_CFLAGS += $(cflags-y)
 
-        rustflags-$(CONFIG_MK8)		+= -Ctarget-cpu=k8
-        rustflags-$(CONFIG_MPSC)	+= -Ctarget-cpu=nocona
-        rustflags-$(CONFIG_MCORE2)	+= -Ctarget-cpu=core2
-        rustflags-$(CONFIG_MATOM)	+= -Ctarget-cpu=atom
-        rustflags-$(CONFIG_GENERIC_CPU)	+= -Ztune-cpu=generic
-        KBUILD_RUSTFLAGS += $(rustflags-y)
+    rustflags-$(CONFIG_MK8)		+= -Ctarget-cpu=k8
+    rustflags-$(CONFIG_MPSC)		+= -Ctarget-cpu=nocona
+    rustflags-$(CONFIG_MCORE2)		+= -Ctarget-cpu=core2
+    rustflags-$(CONFIG_MATOM)		+= -Ctarget-cpu=atom
+    rustflags-$(CONFIG_GENERIC_CPU)	+= -Ztune-cpu=generic
+    KBUILD_RUSTFLAGS += $(rustflags-y)
 
-        KBUILD_CFLAGS += -mno-red-zone
-        KBUILD_CFLAGS += -mcmodel=kernel
-        KBUILD_RUSTFLAGS += -Cno-redzone=y
-        KBUILD_RUSTFLAGS += -Ccode-model=kernel
+    KBUILD_CFLAGS += -mno-red-zone
+    KBUILD_CFLAGS += -mcmodel=kernel
+    KBUILD_RUSTFLAGS += -Cno-redzone=y
+    KBUILD_RUSTFLAGS += -Ccode-model=kernel
 endif
 
 #
@@ -176,14 +176,14 @@ endif
 # (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42109)
 #
 ifdef CONFIG_FUNCTION_GRAPH_TRACER
-  ifndef CONFIG_HAVE_FENTRY
-	ACCUMULATE_OUTGOING_ARGS := 1
-  endif
+    ifndef CONFIG_HAVE_FENTRY
+        ACCUMULATE_OUTGOING_ARGS := 1
+    endif
 endif
 
 ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
-	# This compiler flag is not supported by Clang:
-	KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
+    # This compiler flag is not supported by Clang:
+    KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
 endif
 
 # Workaround for a gcc prelease that unfortunately was shipped in a suse release
diff --git a/tools/scripts/Makefile.arch b/tools/scripts/Makefile.arch
index f6a50f06dfc4..bfab64a76dc9 100644
--- a/tools/scripts/Makefile.arch
+++ b/tools/scripts/Makefile.arch
@@ -15,27 +15,27 @@ SRCARCH := $(ARCH)
 
 # Additional ARCH settings for x86
 ifeq ($(ARCH),i386)
-        SRCARCH := x86
+    SRCARCH := x86
 endif
 ifeq ($(ARCH),x86_64)
-        SRCARCH := x86
+    SRCARCH := x86
 endif
 
 # Additional ARCH settings for sparc
 ifeq ($(ARCH),sparc32)
-       SRCARCH := sparc
+    SRCARCH := sparc
 endif
 ifeq ($(ARCH),sparc64)
-       SRCARCH := sparc
+    SRCARCH := sparc
 endif
 
 # Additional ARCH settings for loongarch
 ifeq ($(ARCH),loongarch32)
-       SRCARCH := loongarch
+    SRCARCH := loongarch
 endif
 
 ifeq ($(ARCH),loongarch64)
-       SRCARCH := loongarch
+    SRCARCH := loongarch
 endif
 
 LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 6fba29f3222d..2f46fe6831f3 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -1,14 +1,14 @@
 # SPDX-License-Identifier: GPL-2.0
 ifneq ($(O),)
-ifeq ($(origin O), command line)
-	dummy := $(if $(shell cd $(PWD); test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
-	ABSOLUTE_O := $(shell cd $(PWD); cd $(O) ; pwd)
-	OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
-	COMMAND_O := O=$(ABSOLUTE_O)
-ifeq ($(objtree),)
-	objtree := $(O)
-endif
-endif
+    ifeq ($(origin O), command line)
+        dummy := $(if $(shell cd $(PWD); test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
+        ABSOLUTE_O := $(shell cd $(PWD); cd $(O) ; pwd)
+        OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
+        COMMAND_O := O=$(ABSOLUTE_O)
+        ifeq ($(objtree),)
+            objtree := $(O)
+        endif
+    endif
 endif
 
 # check that the output directory actually exists
@@ -161,31 +161,31 @@ QUIET_SUBDIR0  = +$(MAKE) $(COMMAND_O) -C # space to separate -C and subdir
 QUIET_SUBDIR1  =
 
 ifneq ($(silent),1)
-  ifneq ($(V),1)
-	QUIET_CC       = @echo '  CC      '$@;
-	QUIET_CC_FPIC  = @echo '  CC FPIC '$@;
-	QUIET_CLANG    = @echo '  CLANG   '$@;
-	QUIET_AR       = @echo '  AR      '$@;
-	QUIET_LINK     = @echo '  LINK    '$@;
-	QUIET_MKDIR    = @echo '  MKDIR   '$@;
-	QUIET_GEN      = @echo '  GEN     '$@;
-	QUIET_SUBDIR0  = +@subdir=
-	QUIET_SUBDIR1  = ;$(NO_SUBDIR) \
-			  echo '  SUBDIR  '$$subdir; \
-			 $(MAKE) $(PRINT_DIR) -C $$subdir
-	QUIET_FLEX     = @echo '  FLEX    '$@;
-	QUIET_BISON    = @echo '  BISON   '$@;
-	QUIET_GENSKEL  = @echo '  GENSKEL '$@;
+    ifneq ($(V),1)
+        QUIET_CC       = @echo '  CC      '$@;
+        QUIET_CC_FPIC  = @echo '  CC FPIC '$@;
+        QUIET_CLANG    = @echo '  CLANG   '$@;
+        QUIET_AR       = @echo '  AR      '$@;
+        QUIET_LINK     = @echo '  LINK    '$@;
+        QUIET_MKDIR    = @echo '  MKDIR   '$@;
+        QUIET_GEN      = @echo '  GEN     '$@;
+        QUIET_SUBDIR0  = +@subdir=
+        QUIET_SUBDIR1  = ;$(NO_SUBDIR) \
+                         echo '  SUBDIR  '$$subdir; \
+                         $(MAKE) $(PRINT_DIR) -C $$subdir
+        QUIET_FLEX     = @echo '  FLEX    '$@;
+        QUIET_BISON    = @echo '  BISON   '$@;
+        QUIET_GENSKEL  = @echo '  GENSKEL '$@;
 
-	descend = \
-		+@echo	       '  DESCEND '$(1); \
-		mkdir -p $(OUTPUT)$(1) && \
-		$(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1) $(2)
+        descend = \
+                +@echo	       '  DESCEND '$(1); \
+                mkdir -p $(OUTPUT)$(1) && \
+                $(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1) $(2)
 
-	QUIET_CLEAN    = @printf '  CLEAN   %s\n' $1;
-	QUIET_INSTALL  = @printf '  INSTALL %s\n' $1;
-	QUIET_UNINST   = @printf '  UNINST  %s\n' $1;
-  endif
+        QUIET_CLEAN    = @printf '  CLEAN   %s\n' $1;
+        QUIET_INSTALL  = @printf '  INSTALL %s\n' $1;
+        QUIET_UNINST   = @printf '  UNINST  %s\n' $1;
+    endif
 endif
 
 pound := \#
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] Kbuild fixes for v6.8-rc3
  2024-02-01 23:57   ` Masahiro Yamada
@ 2024-02-02  0:43     ` Linus Torvalds
  2024-02-02  2:15       ` Masahiro Yamada
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Torvalds @ 2024-02-02  0:43 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Linux Kernel Mailing List, Linux Kbuild mailing list

On Thu, 1 Feb 2024 at 15:57, Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Is this your expectation?

Commit 82175d1f9430 touched *only* the nested 'if' indentations.

Your attached changed other indentations too, which I am not sure
makes any sense.

But honestly, that whole make rule wrt whitespace makes no sense to
begin with, and I don't know why the conditional statement is so
special to begin with, and why GNU make would then suddenly start
messing with an insane rule with bad historical reasons.

End result: all of this just reinforces how bad the Make rules for
whitespace is, but I would suggest doing the *minimal* changes to make
it work.

Which commit 82175d1f9430 did, but your attached patch then does not.

IOW, if the whole crazy makefile whitespace change was only about
conditionals, let's keep all the stupid whitespace fixups as purely
about conditionals too.

             Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] Kbuild fixes for v6.8-rc3
  2024-02-02  0:43     ` Linus Torvalds
@ 2024-02-02  2:15       ` Masahiro Yamada
  2024-02-03 23:59         ` Masahiro Yamada
  0 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2024-02-02  2:15 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, Linux Kbuild mailing list

[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]

Hello Linus,


On Fri, Feb 2, 2024 at 9:43 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Thu, 1 Feb 2024 at 15:57, Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > Is this your expectation?
>
> Commit 82175d1f9430 touched *only* the nested 'if' indentations.
>
> Your attached changed other indentations too, which I am not sure
> makes any sense.
>
> But honestly, that whole make rule wrt whitespace makes no sense to
> begin with, and I don't know why the conditional statement is so
> special to begin with, and why GNU make would then suddenly start
> messing with an insane rule with bad historical reasons.


In my understanding, the GNU Make parser is confused with
shell's 'else' keyword.

So, GNU Make determined that 'else' indented with a tab
is not the Make's conditional directive.


>
> End result: all of this just reinforces how bad the Make rules for
> whitespace is, but I would suggest doing the *minimal* changes to make
> it work.
>
> Which commit 82175d1f9430 did, but your attached patch then does not.
>
> IOW, if the whole crazy makefile whitespace change was only about
> conditionals, let's keep all the stupid whitespace fixups as purely
> about conditionals too.
>
>              Linus
>


I attached a new patch.
I only changed the lines touch by 82175d1f9430







-- 
Best Regards
Masahiro Yamada

[-- Attachment #2: 0001-kbuild-use-4-space-indentation-when-followed-by-cond.patch --]
[-- Type: text/x-patch, Size: 4194 bytes --]

From 4de9490472b3cd6fb5c783ea5fd130e32695da2e Mon Sep 17 00:00:00 2001
From: Masahiro Yamada <masahiroy@kernel.org>
Date: Fri, 2 Feb 2024 10:31:42 +0900
Subject: [PATCH] kbuild: use 4-space indentation when followed by conditionals

GNU Make manual [1] clearly forbids a tab at the beginning of the
conditional directive line:
 "Extra spaces are allowed and ignored at the beginning of the
  conditional directive line, but a tab is not allowed."

This will not work for the next release of GNU Make, hence commit
82175d1f9430 ("kbuild: Replace tabs with spaces when followed by
conditionals") replaced the inappropriate tabs with 8 spaces.

However, the 8-space indentation cannot be visually distinguished.
Linus suggested 2-4 spaces for those nested if-statements. [2]

This commit redoes the replacement with 4 spaces.

[1]: https://www.gnu.org/software/make/manual/make.html#Conditional-Syntax
[2]: https://lore.kernel.org/all/CAHk-=whJKZNZWsa-VNDKafS_VfY4a5dAjG-r8BZgWk_a-xSepw@mail.gmail.com/

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
 Makefile             | 12 ++++++------
 arch/m68k/Makefile   |  4 ++--
 arch/parisc/Makefile |  4 ++--
 arch/x86/Makefile    |  8 ++++----
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index 113f7c762f0a..17c2f02aaae9 100644
--- a/Makefile
+++ b/Makefile
@@ -294,15 +294,15 @@ may-sync-config	:= 1
 single-build	:=
 
 ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
-        ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
+    ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
 		need-config :=
-        endif
+    endif
 endif
 
 ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
-        ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
+    ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
 		may-sync-config :=
-        endif
+    endif
 endif
 
 need-compiler := $(may-sync-config)
@@ -323,9 +323,9 @@ endif
 # We cannot build single targets and the others at the same time
 ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
 	single-build := 1
-        ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
+    ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
 		mixed-build := 1
-        endif
+    endif
 endif
 
 # For "make -j clean all", "make -j mrproper defconfig all", etc.
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index 76ef1a67c361..0abcf994ce55 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -15,10 +15,10 @@
 KBUILD_DEFCONFIG := multi_defconfig
 
 ifdef cross_compiling
-        ifeq ($(CROSS_COMPILE),)
+    ifeq ($(CROSS_COMPILE),)
 		CROSS_COMPILE := $(call cc-cross-prefix, \
 			m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
-        endif
+    endif
 endif
 
 #
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 7486b3b30594..316f84f1d15c 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -50,12 +50,12 @@ export CROSS32CC
 
 # Set default cross compiler for kernel build
 ifdef cross_compiling
-        ifeq ($(CROSS_COMPILE),)
+    ifeq ($(CROSS_COMPILE),)
 		CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
 		CROSS_COMPILE := $(call cc-cross-prefix, \
 			$(foreach a,$(CC_ARCHES), \
 			$(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
-        endif
+    endif
 endif
 
 ifdef CONFIG_DYNAMIC_FTRACE
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 2264db14a25d..da8f3caf2781 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -112,13 +112,13 @@ ifeq ($(CONFIG_X86_32),y)
         # temporary until string.h is fixed
         KBUILD_CFLAGS += -ffreestanding
 
-        ifeq ($(CONFIG_STACKPROTECTOR),y)
-                ifeq ($(CONFIG_SMP),y)
+    ifeq ($(CONFIG_STACKPROTECTOR),y)
+        ifeq ($(CONFIG_SMP),y)
 			KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard
-                else
+        else
 			KBUILD_CFLAGS += -mstack-protector-guard=global
-                endif
         endif
+    endif
 else
         BITS := 64
         UTS_MACHINE := x86_64
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] Kbuild fixes for v6.8-rc3
  2024-02-02  2:15       ` Masahiro Yamada
@ 2024-02-03 23:59         ` Masahiro Yamada
  2024-02-04  6:27           ` Linus Torvalds
  0 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2024-02-03 23:59 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, Linux Kbuild mailing list

Hello Linus,

On Fri, Feb 2, 2024 at 11:15 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Hello Linus,
>
>
> On Fri, Feb 2, 2024 at 9:43 AM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > On Thu, 1 Feb 2024 at 15:57, Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > Is this your expectation?
> >
> > Commit 82175d1f9430 touched *only* the nested 'if' indentations.
> >
> > Your attached changed other indentations too, which I am not sure
> > makes any sense.
> >
> > But honestly, that whole make rule wrt whitespace makes no sense to
> > begin with, and I don't know why the conditional statement is so
> > special to begin with, and why GNU make would then suddenly start
> > messing with an insane rule with bad historical reasons.
>
>
> In my understanding, the GNU Make parser is confused with
> shell's 'else' keyword.
>
> So, GNU Make determined that 'else' indented with a tab
> is not the Make's conditional directive.
>
>
> >
> > End result: all of this just reinforces how bad the Make rules for
> > whitespace is, but I would suggest doing the *minimal* changes to make
> > it work.
> >
> > Which commit 82175d1f9430 did, but your attached patch then does not.
> >
> > IOW, if the whole crazy makefile whitespace change was only about
> > conditionals, let's keep all the stupid whitespace fixups as purely
> > about conditionals too.
> >
> >              Linus
> >
>
>
> I attached a new patch.
> I only changed the lines touch by 82175d1f9430


Is the second patch fine with you?

If so, will you pick it up, or do you want me
to include it in the next pull request?





-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] Kbuild fixes for v6.8-rc3
  2024-02-03 23:59         ` Masahiro Yamada
@ 2024-02-04  6:27           ` Linus Torvalds
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Torvalds @ 2024-02-04  6:27 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Linux Kernel Mailing List, Linux Kbuild mailing list

On Sun, 4 Feb 2024 at 00:00, Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Is the second patch fine with you?

Yes.

> If so, will you pick it up, or do you want me
> to include it in the next pull request?

This is not critical enough to bypass the regular pull chain, so just
put it in your queue, and I'll get it with the next pull.

             Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-04  6:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01 13:39 [GIT PULL] Kbuild fixes for v6.8-rc3 Masahiro Yamada
2024-02-01 20:06 ` Linus Torvalds
2024-02-01 23:57   ` Masahiro Yamada
2024-02-02  0:43     ` Linus Torvalds
2024-02-02  2:15       ` Masahiro Yamada
2024-02-03 23:59         ` Masahiro Yamada
2024-02-04  6:27           ` Linus Torvalds
2024-02-01 21:02 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).