Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp799143pxb; Mon, 16 Aug 2021 18:41:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwM7z9R6Q4nTJRRx51aL096k3aDDRZpb7Lv8gCWpyU1iBmCkbOg6MdYMTgPGQIfeYzVmBDI X-Received: by 2002:a6b:b512:: with SMTP id e18mr985780iof.98.1629164481670; Mon, 16 Aug 2021 18:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629164481; cv=none; d=google.com; s=arc-20160816; b=0znL5kvEmBbhZQgCc1Zp7KES7n/5QlP0sSJucUX4GiZjxbpUWD6QNuwcMTVJs5DLdx dyN7jaujpZL/Xo5oGamauaeXZivj2zQZoByQ3GqHUJARVpX+JAD5pqv4eklwd+Q5Jbyn WVHkm8bbshug7piZ/dwBmOgYN2xCXV4S3j4A56u0ysVZUSNEJZAxCrVDcQC1bjefqTu2 tLmtaz5zHJ7WY9x8qxCAVtIGHQM12iBeGfMDOGA688MLu7dypLWRubIQwGXfLaKByWZ3 J2tv9lS/ygd3fPtVZYd+BpCaoLKfd//bnMW89tjGxy2+pnJ5UNLbBLVjjdpKiQNNKwnV bhmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=5NWkg+bxS9gK9TpUYBiD3sVAhmuzKvoT9bOeRCZQU14=; b=ULzmM9uhaWG9FREuJKTlJw9/y1RGPv/k6Gh9SNfRT/ddBfUIk8BSjf5lPcqyB12uEg yqeuY3Yiy2kD3vQaqJrHbHr3flH7H2uMdByE2lJt+sl755UX3K86wy4r7qhSXk31DioD iatY1XOAb9MzkXKw79+Ob4SXCrh1ZullRMkVWYh+BeV5DAVhNNtCbT2oDiEBvA/UWovg 2NWJMc1em9fD3auxFYifY5JTxbO/kXHJjFkX8dlAijWrBaysawSztBa33reEV1crcCxG v0sx5Ft7OtfK5XtdgAUV+xGNGH3FUsa9V2waT6n0J3Q4SZ+KizD39Ts84l3R6GuVFsA1 7zyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=KNHDtYbN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si924824iow.102.2021.08.16.18.41.10; Mon, 16 Aug 2021 18:41:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=KNHDtYbN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236729AbhHQBkV (ORCPT + 99 others); Mon, 16 Aug 2021 21:40:21 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:21538 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236662AbhHQBkS (ORCPT ); Mon, 16 Aug 2021 21:40:18 -0400 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 17H1dXKn018934; Tue, 17 Aug 2021 10:39:34 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 17H1dXKn018934 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1629164374; bh=5NWkg+bxS9gK9TpUYBiD3sVAhmuzKvoT9bOeRCZQU14=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KNHDtYbNVE63+TfAvnvpEYW8qXz+PxOtI9+w9u+wxh6Xl8IHtrC0uSzMFPc80vAcF MykIhs567l5d3FTN1KCOvZlRvZC92lqzxOneyAAJ/WPUcHbJmabP/zHMgBvoVGgt9+ DyMFAIQrpBEzKIKKk03G/pjmoRWDGe21/w0h3uN/6dVkLIqBkv4bcpkNsLCS68V9zZ 9JD0XRJbG2NP01/hgST18Zk4NJH5QwB+WFhNqKMb7RH4lTqEVkNWVB6HRDXAEBodPU b0FUWzO8HCOhV4FvEBk724ZOfmvfa/Z9aTjgF4TzYAnN571vTpqkJJzx02oNO6MaDQ jBkS7OKW88rQA== X-Nifty-SrcIP: [209.85.216.42] Received: by mail-pj1-f42.google.com with SMTP id cp15-20020a17090afb8fb029017891959dcbso2163254pjb.2; Mon, 16 Aug 2021 18:39:34 -0700 (PDT) X-Gm-Message-State: AOAM532FRXiy0nB4LRVEUYGnaPCZhUsuSCrmQCs4bk3zXCWZyGACasDG NvxmD+Jfsp2T/y9s1Aajkd1q3ASoUQKpSyXutKQ= X-Received: by 2002:a17:902:bc41:b029:12d:3f9b:401e with SMTP id t1-20020a170902bc41b029012d3f9b401emr745719plz.47.1629164373202; Mon, 16 Aug 2021 18:39:33 -0700 (PDT) MIME-Version: 1.0 References: <20210810204240.4008685-1-ndesaulniers@google.com> In-Reply-To: From: Masahiro Yamada Date: Tue, 17 Aug 2021 10:38:55 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Makefile: remove stale cc-option checks To: Nick Desaulniers Cc: Michal Marek , Nathan Chancellor , Andrew Morton , "Paul E. McKenney" , Peter Zijlstra , Miguel Ojeda , Tetsuo Handa , Vitor Massaru Iha , Sedat Dilek , Daniel Latypov , Linux Kbuild mailing list , Linux Kernel Mailing List , clang-built-linux , Naresh Kamboju Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 17, 2021 at 9:16 AM Masahiro Yamada wrote: > > On Tue, Aug 17, 2021 at 3:36 AM Nick Desaulniers > wrote: > > > > On Fri, Aug 13, 2021 at 6:43 PM Masahiro Yamada wrote: > > > > > > On Wed, Aug 11, 2021 at 5:42 AM Nick Desaulniers > > > wrote: > > > > > > > > --param=allow-store-data-races=0 was renamed to --allow-store-data-races > > > > in the GCC 10 release. > > > > > > > > diff --git a/Makefile b/Makefile > > > > index 027fdf2a14fe..3e3fb4affba1 100644 > > > > --- a/Makefile > > > > +++ b/Makefile > > > > @@ -844,17 +847,17 @@ KBUILD_RUSTFLAGS += -Copt-level=z > > > > endif > > > > > > > > # Tell gcc to never replace conditional load with a non-conditional one > > > > -KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0) > > > > +ifdef CONFIG_CC_IS_GCC > > > > > > > > > Can you insert a comment here? > > > > > > # GCC 10 renamed --param=allow-store-data-races=0 to --allow-store-data-races > > > > > > > > > It will remind us of dropping this conditional > > > in the (long long distant) future. > > > > > > > > > > > > > > > > +KBUILD_CFLAGS += $(call cc-option,--allow-store-data-races,--param=allow-store-data-races=0) > > > > KBUILD_CFLAGS += $(call cc-option,-fno-allow-store-data-races) > > > > +endif > > > > This report is confusing: > > https://lore.kernel.org/linux-mm/202108160729.Lx0IJzq3-lkp@intel.com/ > > (csky gcc-11) > > > > >> csky-linux-gcc: error: unrecognized command-line option '--param=allow-store-data-races=0'; did you mean '--allow-store-data-races'? > > > > I wonder if cc-option detection for these is broken? > > I do not say it is broken... > > > cc-option is defined like this: > > cc-option = $(call __cc-option, $(CC),\ > $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS),$(1),$(2)) > > > It is checking > $(KBUILD_CPPFLAGS) + $(KBUILD_CFLAGS) > + --allow-store-data-races > > > A few lines above, I see > > csky-linux-gcc: error: unrecognized argument in option '-mcpu=ck860' > > > It makes all the cc-option tests fail after this line: > KBUILD_CFLAGS += -mcpu=$(CPUTYPE) -Wa,-mcpu=$(MCPU_STR) > > > Then, > > $(call cc-option,--allow-store-data-races,--param=allow-store-data-races=0) > > falls back to --param=allow-store-data-races=0 > > > > > > Perhaps I should > > not touch these other than to wrap them in the CONFIG_CC_IS_GCC guard? > > I do not think so. > > If an unrecognized argument appears, > all the cc-option tests that follow are unreliable. > > > > If you are not comfortable with it, > you can split it. > > KBUILD_CFLAGS += $(call cc-option,--allow-store-data-races) > KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0) I read the patch in the wrong way. This is the same as the current code. So, your v2 is fine with me. I will pick it up soon. -- Best Regards Masahiro Yamada