From nobody Tue Jun 30 10:15:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02D6AC433EF for ; Wed, 19 Jan 2022 13:52:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353336AbiASNwL (ORCPT ); Wed, 19 Jan 2022 08:52:11 -0500 Received: from mga05.intel.com ([192.55.52.43]:59410 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235698AbiASNwK (ORCPT ); Wed, 19 Jan 2022 08:52:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642600330; x=1674136330; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=V6xj/70rR9995gOWyZ2fhDWt5YCJUunhJStJfwvw0ds=; b=Qr82z7QNjzR3qw3ritHdY4J04BfnBHWNhuIOzIdVxZmeonYFDNAj164X BQpfpTTgBFz0DxuUnHqYksUXP/NArafEcdN5Kk+6TUPPiwpYEY1pRHIVP gEoK7vvZ5LpGbOy+murd+TwbXOBVUNIdvw94w6Br7pbBxMDMd32WFwWAP fJKSfN1PPQJYTcI3Eohip+vXKeN+voOaqLzTfel2PEnfVax70Cf+l018K /++acZg5REwaEXC8VA6Xi1GcScDf9UWa/jLhgQZ9tModuCxQxK0eiY6RD tpfXH1BWDwjYhG328HwlUnbThszOHYy582jt1bXzw3QWU5UPf2CudRSct w==; X-IronPort-AV: E=McAfee;i="6200,9189,10231"; a="331419653" X-IronPort-AV: E=Sophos;i="5.88,299,1635231600"; d="scan'208";a="331419653" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2022 05:52:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,299,1635231600"; d="scan'208";a="477379673" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga006.jf.intel.com with ESMTP; 19 Jan 2022 05:52:07 -0800 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= To: linux-kbuild@vger.kernel.org, Masahiro Yamada , Michal Marek , Nick Desaulniers , Nathan Chancellor Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, "Rafael J . Wysocki" , Andy Shevchenko , Cezary Rojewski , =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= Subject: [PATCH] Makefile: Fix build with scan-build Date: Wed, 19 Jan 2022 14:51:47 +0100 Message-Id: <20220119135147.1859982-1-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building kernel with scan-build for analysis: $ scan-build make defconfig $ scan-build make menuconfig # disable RETPOLINE $ scan-build make -j16 bindeb-pkg since commit 7d73c3e9c514 ("Makefile: remove stale cc-option checks") it fails with: CC scripts/mod/empty.o could not find clang line make[4]: *** [scripts/Makefile.build:287: scripts/mod/empty.o] Error 1 Seems like changes to how -fconserve-stack support was detected broke build with scan-build. Revert part of mentioned commit which changed that. Fixes: 7d73c3e9c514 ("Makefile: remove stale cc-option checks") CC: Nick Desaulniers Signed-off-by: Amadeusz S=C5=82awi=C5=84ski Reviewed-by: Cezary Rojewski --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 765115c99655..1174ccd182f5 100644 --- a/Makefile +++ b/Makefile @@ -991,9 +991,7 @@ KBUILD_CFLAGS +=3D -fno-strict-overflow KBUILD_CFLAGS +=3D -fno-stack-check =20 # conserve stack if available -ifdef CONFIG_CC_IS_GCC -KBUILD_CFLAGS +=3D -fconserve-stack -endif +KBUILD_CFLAGS +=3D $(call cc-option,-fconserve-stack) =20 # Prohibit date/time macros, which would make the build non-deterministic KBUILD_CFLAGS +=3D -Werror=3Ddate-time --=20 2.25.1