From patchwork Sun Jan 28 15:10:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Goncharov X-Patchwork-Id: 13534501 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75EA123769 for ; Sun, 28 Jan 2024 15:10:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706454652; cv=none; b=Iij1rit9pNFy1jzQzCZmPzp59cMSeKqMlsQYkhPBGTe6DzA/QhEyIJ5srg/2qK64CeGFViV0MLnLu5+GrSrKtM0EiIBCQGWQzFumEPwbJT5rb3Q6hyzcgeckv+Gqn9gUnYp44HmQJYEYxSxL8stVAVQet8ubRgLcdQnpNBZ3WlI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706454652; c=relaxed/simple; bh=mKlyFNIY6rTw5AYDDJcOLJqP4SToGodLyoEEE8xBr0g=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=aff0y/Dx+adKeewBpGwrA9jYMAPBk/+5lAbjnq+fgnQJhBrOiaRNFeeeIMSyOAQoVc+ooY1uwssJ+Jot2DETf2pdUxzzsdopOOaB+HX3wIt9GtYMo21rfddp7johZ4K0vLqk+0zCWgeoKjwHlVLIWrSaAVm/ULhrWpznUpzcyLk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=users.sf.net; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.215.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=users.sf.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-517ab9a4a13so1697870a12.1 for ; Sun, 28 Jan 2024 07:10:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706454650; x=1707059450; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qcLnVAaXT394Sf9QLpqga3m3zVMVvqVXrW3f/mAyjDo=; b=XobukSVtNasWe5E8NUJYoUxq8qSki7BxcfQhHi+JDm+1nSQO9QCss9w7mhuJKFhvRI lTPGrDWKnpJddIvp396Ngt//aecvJWApzkvEUnEsm7+0Fxk6YxVlJOadJ9Ue4I5cGCyx uZa0zd4apsMTsmfzmtEB+GjvHeD9T1Mlk1oeSGJZ/77IZqj126g7afhgIW5qqzbuXLbT 7DWBMMS0nRL14sBWjiuOwv6wJJsSgk+SoG+a1cTyXvh0nBDXXGL9MX42T4/e0UrfyXTY u5VsBbEVFd35OYtfTRyScQhoh5uPwuZXzFvROMjSf72GATZMf7YZRtkZ46pcmos3o5Sd PsMw== X-Gm-Message-State: AOJu0Ywd3EB8CdtYn0hOEYV4I/yy982ypfX9xhrYuuCSrZ+rIsCD1eFw tWXC1tmyyuT+AiqetAsSbgKk96fFH/0EBtlZHfhG6YTsRuNR5fpUNSdnfsfjmugMq3iu/Z/TMPx fo00M3lgiRSxsLrdeRKcWLa42PyVxDedUw7g= X-Google-Smtp-Source: AGHT+IGsUOJBg+CIz65lo181ko3uMc8DfMDJalmQkOJ14raBf3JOzz2Lc0yiThW72vvWSrPVA5sP9rNRSZMmMQmS7ag= X-Received: by 2002:a17:90b:1993:b0:28e:89cd:4fb7 with SMTP id mv19-20020a17090b199300b0028e89cd4fb7mr2051334pjb.22.1706454650511; Sun, 28 Jan 2024 07:10:50 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Dmitry Goncharov Date: Sun, 28 Jan 2024 10:10:39 -0500 Message-ID: Subject: [v2] kbuild: Replace tabs with spaces when followed by conditionals. To: linux-kbuild@vger.kernel.org, Masahiro Yamada , Martin Dorey 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-kbu ild/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. In case the mailer program messes up the tabs and spaces in the diff, i enclosed the patch in the attachment. Signed-off-by: Dmitry Goncharov Reported-by: Martin Dorey regards, Dmitry diff --git a/Makefile b/Makefile index 9869f57c3fb3..12dcc51c586a 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 43e39040d3ac..76ef1a67c361 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 920db57b6b4c..7486b3b30594 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 1a068de12a56..2264db14a25d 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 + endif else BITS := 64 UTS_MACHINE := x86_64