From patchwork Thu Sep 10 13:51:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11767865 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A0F159D for ; Thu, 10 Sep 2020 13:54:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F31D720809 for ; Thu, 10 Sep 2020 13:54:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZtWONFBk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="buyXflRa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F31D720809 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=MK9FoC+ksQRF2hE8bXo4mUCUdXEZRw4xZPb/uoD3iSI=; b=ZtWONFBk5p20sY2rzgBSpy+8d6 hq2+Tr9mEj3YpikQJZwt8/yYQtQqYAd+DDlOyXoPJb09WuvDKhXbZ93ZJjTzGUUoHG8NxT+j/8Ouf B3pQu0jmm5LwWxo+Jxy11Ax07yaq2AdzVk3+DbfzsxPjSxwytIgV9smh5wJETmtoTuKZIe2l97PIT 2GotCLisC/qzK2BURHIx46bhvK9+mFQSfE4DToSNnCLVp00q4+piEpvnKE/kKqjdmbRQ8fQoIVyJC eiayaVEd41AlchbNty9DwpnrXFPCI9H+0on91eGW6OguLQBC+rhsxi53XxfTTHA1UnSZu8CSZCc1j idOllPwg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGN0V-0002P4-6d; Thu, 10 Sep 2020 13:52:59 +0000 Received: from conuserg-10.nifty.com ([210.131.2.77]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGN0Q-0002O8-JG for linux-arm-kernel@lists.infradead.org; Thu, 10 Sep 2020 13:52:56 +0000 Received: from oscar.flets-west.jp (softbank126090211135.bbtec.net [126.90.211.135]) (authenticated) by conuserg-10.nifty.com with ESMTP id 08ADpSIv001308; Thu, 10 Sep 2020 22:51:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 08ADpSIv001308 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1599745889; bh=JHjawyNi+2UsmyXrYxyqMJXMi2+rCaAViXhyNLVuK8M=; h=From:To:Cc:Subject:Date:From; b=buyXflRaxjagpRHTL+9r/eT3QLgJLolWsUxnbjtXoDxjXWHVtUDCUi/5rTnV79Q5S nULaajOuWCSJI3UtGUxIj3U8dZLZDsrJ0+ze+ED/FJXW+xt3ppN745E2vIs/CBKEKE Oj61MLp+NUjjmvwkq5qHBzRP2F1gRnZv2qUgBIrAJkIUh+kg6d1p4fURxH9O4AC1nW 0+U0LHAF+8BgK8pkYpXrK5J0WWewIRwz55IN5QdNntD0Oh2JzqAq+wkIjWzaln1li0 2FvyHn/jDYwz47/UeJFtzUdUB25T0PvbTemNV53NpFvM23ty3AEwG37txOgD3awkDR 7cJBpo5TiyYUA== X-Nifty-SrcIP: [126.90.211.135] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH 1/4] kbuild: remove cc-option test of -fno-strict-overflow Date: Thu, 10 Sep 2020 22:51:17 +0900 Message-Id: <20200910135120.3527468-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_095255_132572_1AD89CC2 X-CRM114-Status: GOOD ( 12.72 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [210.131.2.77 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Marek , Catalin Marinas , Masahiro Yamada , Nick Desaulniers , linux-kernel@vger.kernel.org, Stephen Boyd , clang-built-linux@googlegroups.com, Ingo Molnar , Nathan Chancellor , Vincenzo Frascino , Will Deacon , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The minimal compiler versions, GCC 4.9 and Clang 10 support this flag. Here is the godbolt: https://godbolt.org/z/odq8h9 Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Acked-by: Will Deacon --- Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4b5a305e30d2..059b36f2ea53 100644 --- a/Makefile +++ b/Makefile @@ -922,7 +922,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, restrict) KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized) # disable invalid "can't wrap" optimizations for signed / pointers -KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) +KBUILD_CFLAGS += -fno-strict-overflow # clang sets -fmerge-all-constants by default as optimization, but this # is non-conforming behavior for C and in fact breaks the kernel, so we diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index d6adb4677c25..dfffd55175a3 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -90,7 +90,7 @@ VDSO_CFLAGS += -O2 # Some useful compiler-dependent flags from top-level Makefile VDSO_CFLAGS += $(call cc32-option,-Wdeclaration-after-statement,) VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign) -VDSO_CFLAGS += $(call cc32-option,-fno-strict-overflow) +VDSO_CFLAGS += -fno-strict-overflow VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes) VDSO_CFLAGS += $(call cc32-option,-Werror=date-time) VDSO_CFLAGS += $(call cc32-option,-Werror=incompatible-pointer-types) From patchwork Thu Sep 10 13:51:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11767863 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 519B459D for ; Thu, 10 Sep 2020 13:53:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E29320809 for ; Thu, 10 Sep 2020 13:53:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sW42E46M"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="1OH9UBl3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E29320809 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UCUAcmgj7qgRWj0Za7P0UDAinv6IgpJQWB+lV/SbieA=; b=sW42E46MIAnhfSHYWvHbRGqT8 zDS6+MUt7GXPzjINZ6mzNzVGzwDlTdqseAkOzyjSkFjI6/WgM5acgOB6a0VM9sONgOwZCjPJ4MsGa ELEarnRCRx7eKNRoHqG5WekCZKQ9i/N37J4E72b3PSsxJcUSoLm5EIK4wgk9SkC9SMSiPikVs4Hgy OGfCsJyrsBZm7quxKNsUkymSTrfk0dEkc6u/6E4tCoRWWz9pgaS2hd1tETbnS+SpNs04RO0kfQXMc wA+zbV6ZefNGPQ8GGaSElGDAjNT73syFDQ6gh1D2s4uN6LSLmcj+jLY7T7gz6p6bZvMpcTj5M+z/m 7okg0UNxQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGN0T-0002Or-Pt; Thu, 10 Sep 2020 13:52:57 +0000 Received: from conuserg-10.nifty.com ([210.131.2.77]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGN0Q-0002O9-JE for linux-arm-kernel@lists.infradead.org; Thu, 10 Sep 2020 13:52:56 +0000 Received: from oscar.flets-west.jp (softbank126090211135.bbtec.net [126.90.211.135]) (authenticated) by conuserg-10.nifty.com with ESMTP id 08ADpSJ0001308; Thu, 10 Sep 2020 22:51:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 08ADpSJ0001308 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1599745893; bh=K01RYjZ9wy1tuci78KttomtfIouE9FTDhkSr4QzxpNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1OH9UBl3mJpDIo0SH3Q8bILjszIxHdnVNj6Za9phRQiubjlbRAFg0W4DpIhREkpfY IzcvFpjVKKtz83ChLHqV5HavmKP3HuDNxXrlFawgFJVBCsn1jUQdfbiY4fON3vFkRB n7JQj++2onXAhbaUjzwcrT9Z2g022EgyV76pJ12+JwE8YsDGuJqA7xC5eBJMvQfg0k u8Tbx7HcDmKf8KxpAWs1rEIU9S8UorSqDOOGdCFBZAeQTG5ZdJUcbiJVUMDcYDHKy6 ttp/K1VP/fUSA8NSW2NRyi5xldWaoRUxztJ+067BgCmzvWoDpskFgfy0y3McjFqte4 gbl5M7iRalKfA== X-Nifty-SrcIP: [126.90.211.135] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH 4/4] kbuild: remove cc-option test of -Werror=date-time Date: Thu, 10 Sep 2020 22:51:20 +0900 Message-Id: <20200910135120.3527468-4-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200910135120.3527468-1-masahiroy@kernel.org> References: <20200910135120.3527468-1-masahiroy@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_095255_132258_96073414 X-CRM114-Status: GOOD ( 13.13 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [210.131.2.77 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Marek , Catalin Marinas , Masahiro Yamada , Nick Desaulniers , linux-kernel@vger.kernel.org, Stephen Boyd , clang-built-linux@googlegroups.com, Ingo Molnar , Nathan Chancellor , Vincenzo Frascino , Will Deacon , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The minimal compiler versions, GCC 4.9 and Clang 10 support this flag. Here is the godbolt: https://godbolt.org/z/xvjcMa Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor --- Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5102c89d3167..1d7c58684fda 100644 --- a/Makefile +++ b/Makefile @@ -940,7 +940,7 @@ KBUILD_CFLAGS += -fno-stack-check KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) # Prohibit date/time macros, which would make the build non-deterministic -KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) +KBUILD_CFLAGS += -Werror=date-time # enforce correct pointer usage KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types) diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index dfffd55175a3..1feb4f8e556e 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -92,7 +92,7 @@ VDSO_CFLAGS += $(call cc32-option,-Wdeclaration-after-statement,) VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign) VDSO_CFLAGS += -fno-strict-overflow VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes) -VDSO_CFLAGS += $(call cc32-option,-Werror=date-time) +VDSO_CFLAGS += -Werror=date-time VDSO_CFLAGS += $(call cc32-option,-Werror=incompatible-pointer-types) # The 32-bit compiler does not provide 128-bit integers, which are used in