Skip to content

Commit 82175d1

Browse files
gtkillermasahir0y
authored andcommitted
kbuild: Replace tabs with spaces when followed by conditionals
This is needed for the future (post make-4.4.1) versions of gnu make. Starting from https://git.savannah.gnu.org/cgit/make.git/commit/?id=07fcee35f058a876447c8a021f9eb1943f902534 gnu make won't allow conditionals to follow recipe prefix. For example there is a tab followed by ifeq on line 324 in the root Makefile. With the new make this conditional causes the following $ make cpu.o /home/dgoncharov/src/linux-kbuild/Makefile:2063: *** missing 'endif'. Stop. make: *** [Makefile:240: __sub-make] Error 2 This patch replaces tabs followed by conditionals with 8 spaces. See https://savannah.gnu.org/bugs/?64185 and https://savannah.gnu.org/bugs/?64259 for details. Signed-off-by: Dmitry Goncharov <[email protected]> Reported-by: Martin Dorey <[email protected]> Reviewed-by: Miguel Ojeda <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent cda5f94 commit 82175d1

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

Makefile

+6-6
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,15 @@ may-sync-config := 1
294294
single-build :=
295295

296296
ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
297-
ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
297+
ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
298298
need-config :=
299-
endif
299+
endif
300300
endif
301301

302302
ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
303-
ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
303+
ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
304304
may-sync-config :=
305-
endif
305+
endif
306306
endif
307307

308308
need-compiler := $(may-sync-config)
@@ -323,9 +323,9 @@ endif
323323
# We cannot build single targets and the others at the same time
324324
ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
325325
single-build := 1
326-
ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
326+
ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
327327
mixed-build := 1
328-
endif
328+
endif
329329
endif
330330

331331
# For "make -j clean all", "make -j mrproper defconfig all", etc.

arch/m68k/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
KBUILD_DEFCONFIG := multi_defconfig
1616

1717
ifdef cross_compiling
18-
ifeq ($(CROSS_COMPILE),)
18+
ifeq ($(CROSS_COMPILE),)
1919
CROSS_COMPILE := $(call cc-cross-prefix, \
2020
m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
21-
endif
21+
endif
2222
endif
2323

2424
#

arch/parisc/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ export CROSS32CC
5050

5151
# Set default cross compiler for kernel build
5252
ifdef cross_compiling
53-
ifeq ($(CROSS_COMPILE),)
53+
ifeq ($(CROSS_COMPILE),)
5454
CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
5555
CROSS_COMPILE := $(call cc-cross-prefix, \
5656
$(foreach a,$(CC_ARCHES), \
5757
$(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
58-
endif
58+
endif
5959
endif
6060

6161
ifdef CONFIG_DYNAMIC_FTRACE

arch/x86/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ ifeq ($(CONFIG_X86_32),y)
112112
# temporary until string.h is fixed
113113
KBUILD_CFLAGS += -ffreestanding
114114

115-
ifeq ($(CONFIG_STACKPROTECTOR),y)
116-
ifeq ($(CONFIG_SMP),y)
115+
ifeq ($(CONFIG_STACKPROTECTOR),y)
116+
ifeq ($(CONFIG_SMP),y)
117117
KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard
118-
else
118+
else
119119
KBUILD_CFLAGS += -mstack-protector-guard=global
120-
endif
121-
endif
120+
endif
121+
endif
122122
else
123123
BITS := 64
124124
UTS_MACHINE := x86_64

0 commit comments

Comments
 (0)