mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	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 <dgoncharov@users.sf.net> Reported-by: Martin Dorey <martin.dorey@hitachivantara.com> Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
		
							parent
							
								
									cda5f94e88
								
							
						
					
					
						commit
						82175d1f94
					
				
					 4 changed files with 15 additions and 15 deletions
				
			
		
							
								
								
									
										12
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Makefile
									
									
									
									
									
								
							| 
						 | 
					@ -294,15 +294,15 @@ may-sync-config	:= 1
 | 
				
			||||||
single-build	:=
 | 
					single-build	:=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
 | 
					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 :=
 | 
							need-config :=
 | 
				
			||||||
	endif
 | 
					        endif
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
 | 
					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 :=
 | 
							may-sync-config :=
 | 
				
			||||||
	endif
 | 
					        endif
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
need-compiler := $(may-sync-config)
 | 
					need-compiler := $(may-sync-config)
 | 
				
			||||||
| 
						 | 
					@ -323,9 +323,9 @@ endif
 | 
				
			||||||
# We cannot build single targets and the others at the same time
 | 
					# We cannot build single targets and the others at the same time
 | 
				
			||||||
ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
 | 
					ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
 | 
				
			||||||
	single-build := 1
 | 
						single-build := 1
 | 
				
			||||||
	ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
 | 
					        ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
 | 
				
			||||||
		mixed-build := 1
 | 
							mixed-build := 1
 | 
				
			||||||
	endif
 | 
					        endif
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# For "make -j clean all", "make -j mrproper defconfig all", etc.
 | 
					# For "make -j clean all", "make -j mrproper defconfig all", etc.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,10 +15,10 @@
 | 
				
			||||||
KBUILD_DEFCONFIG := multi_defconfig
 | 
					KBUILD_DEFCONFIG := multi_defconfig
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifdef cross_compiling
 | 
					ifdef cross_compiling
 | 
				
			||||||
	ifeq ($(CROSS_COMPILE),)
 | 
					        ifeq ($(CROSS_COMPILE),)
 | 
				
			||||||
		CROSS_COMPILE := $(call cc-cross-prefix, \
 | 
							CROSS_COMPILE := $(call cc-cross-prefix, \
 | 
				
			||||||
			m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
 | 
								m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
 | 
				
			||||||
	endif
 | 
					        endif
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -50,12 +50,12 @@ export CROSS32CC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Set default cross compiler for kernel build
 | 
					# Set default cross compiler for kernel build
 | 
				
			||||||
ifdef cross_compiling
 | 
					ifdef cross_compiling
 | 
				
			||||||
	ifeq ($(CROSS_COMPILE),)
 | 
					        ifeq ($(CROSS_COMPILE),)
 | 
				
			||||||
		CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
 | 
							CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
 | 
				
			||||||
		CROSS_COMPILE := $(call cc-cross-prefix, \
 | 
							CROSS_COMPILE := $(call cc-cross-prefix, \
 | 
				
			||||||
			$(foreach a,$(CC_ARCHES), \
 | 
								$(foreach a,$(CC_ARCHES), \
 | 
				
			||||||
			$(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
 | 
								$(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
 | 
				
			||||||
	endif
 | 
					        endif
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifdef CONFIG_DYNAMIC_FTRACE
 | 
					ifdef CONFIG_DYNAMIC_FTRACE
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -112,13 +112,13 @@ ifeq ($(CONFIG_X86_32),y)
 | 
				
			||||||
        # temporary until string.h is fixed
 | 
					        # temporary until string.h is fixed
 | 
				
			||||||
        KBUILD_CFLAGS += -ffreestanding
 | 
					        KBUILD_CFLAGS += -ffreestanding
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ifeq ($(CONFIG_STACKPROTECTOR),y)
 | 
					        ifeq ($(CONFIG_STACKPROTECTOR),y)
 | 
				
			||||||
		ifeq ($(CONFIG_SMP),y)
 | 
					                ifeq ($(CONFIG_SMP),y)
 | 
				
			||||||
			KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard
 | 
								KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard
 | 
				
			||||||
		else
 | 
					                else
 | 
				
			||||||
			KBUILD_CFLAGS += -mstack-protector-guard=global
 | 
								KBUILD_CFLAGS += -mstack-protector-guard=global
 | 
				
			||||||
		endif
 | 
					                endif
 | 
				
			||||||
	endif
 | 
					        endif
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
        BITS := 64
 | 
					        BITS := 64
 | 
				
			||||||
        UTS_MACHINE := x86_64
 | 
					        UTS_MACHINE := x86_64
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue