From patchwork Sat Jan 27 22:14:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Goncharov X-Patchwork-Id: 13534254 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (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 B01161D692 for ; Sat, 27 Jan 2024 22:14:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706393682; cv=none; b=bJ+wjC3bOKb5ObcCvRtlF/uhDQWzKWmt+wTVgRoEnKud/Zl2QyqNy96+dqVJbctwLt/HX2juWHMpOaB6vIz6+kjNVmjajyVHvpK1w3AQZAQKAdF2ItndC9mIr4zsgSMKLRWdcKSS0Rl3N2dyF76IJtprsM5GJXoNLvl+8kQ2FbE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706393682; c=relaxed/simple; bh=Ukc7Ht1rivM64/nrzKpwbg81QtVJhl82u5AmtmJ/QFI=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=WtGIsU6w2oz2zse3ZL/y5UomN3jBObxO7G8FVLq1YafGPpXqVteGnucGJqSDcafo0dbBjS1r9KXq7u/C6XnWYZJ0AhBLeY3KyEWan6zLzc+f8QnwTM7ZL1eVUxSIfuYor92YJ3t9vf6LQrl9s9q3CR4Lcc4Htg41re8UNCPT7JE= 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.210.49 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-ot1-f49.google.com with SMTP id 46e09a7af769-6dde173384aso1319554a34.1 for ; Sat, 27 Jan 2024 14:14:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706393679; x=1706998479; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=eQC0HpKEwg8JljK4ofISFMi5mEmyQxzivzvlaqF6a38=; b=dYqVgdD12gLqEfrZD/J37yVFCg1nblHdULcS5qUo8W1pwwqiW3lWZ6znmte/MYUdIM 2NM3qm3akQZwTyIFlHkrHlzz///LaQ6/PM2Gp7xg8VpX942DelysLJBPFmSVEInGEUU5 pZ1fg4Q2HDoFq8SkSSZhaOLKLxfEXJb+2CS140Gqj3NfKo7luQjduhyr6qHNNvJTGsm5 HIVCj93D82R48xs98kGJJxYcH420zopj/nggUAESfVCe+yLSkhYdzSSCGfEVVzii0LC0 LH9Kh7OApgV+Y5Ou4YFkyBghAoII4gMlLX9QehjB2aGeeI7JAGDq2Ct9KjlIka2bJ8Tj +JYA== X-Gm-Message-State: AOJu0Yy3Ufvq/zihKNVj/kmT3MveRFiT5FPAo7PFRqnr1eMXwAn+4YFJ hfRqccW9qJoyZjJXkyYj2NPP0G9QeQat6jq1nju3DuExXyM4bQx3klnqxHsg7W8FWRxmv0Dnx5d q0Y05/WAdQxy1T5/PncQNYXtr1vOx5KMdtNk= X-Google-Smtp-Source: AGHT+IFHtdu6qWssn84KQslUIyRfkVrIW/J/FNhRnfDgblNOpYuvKJglGsDclVwbFbLcxUV5/+LRXp2mtrDg/NGSFBA= X-Received: by 2002:a9d:7396:0:b0:6dc:6fac:40f9 with SMTP id j22-20020a9d7396000000b006dc6fac40f9mr2337061otk.39.1706393679518; Sat, 27 Jan 2024 14:14:39 -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: Sat, 27 Jan 2024 17:14:28 -0500 Message-ID: Subject: kbuild: Port build system to the future versions of gnu make. To: linux-kbuild@vger.kernel.org, Masahiro Yamada , Martin Dorey Port build system to 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 See https://savannah.gnu.org/bugs/?64185 and https://savannah.gnu.org/bugs/?64259 for details. This patch replaces tabs followed by conditionals with 8 spaces. In case the mailer program messes up the tabs and spaces in the diff, i enclosed the same patch in the attachment. Signed-off-by: Dmitry Goncharov Reported-by: Martin Dorey regards, Dmitry Reviewed-by: Miguel Ojeda 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