Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp754135pxb; Mon, 16 Aug 2021 17:18:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjWQC4WXWPCnLUVNxR4d7zxFXsUwwyHiZuRIKxaPZDLm61Rwxiil2prLRZE3VuYoC1SALk X-Received: by 2002:a92:dd0e:: with SMTP id n14mr427477ilm.224.1629159525811; Mon, 16 Aug 2021 17:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629159525; cv=none; d=google.com; s=arc-20160816; b=iF9qq9T9Lox+0XoOsYk99jzl51D845WWT+cUZv+UoQEhqHS9onayYvHqTFhRyBcGhV FmjVqs4I5WztnuUwr+9nx8BNvV3+M1NJasxQf0Y69c/L7GrqstlGo4wqDoPFeGmBPP7y XRi4AVmEFY1NruVeYVr2gMMWC+V+C8HC38TDHFrzWuv3OuZFy2zisr+5ugMNsj9aT2Hw fxBRC6AbsozJ7kdq6GkfDqXYk8RCwiGVs9TnS32LKxw8sUCI9X0TT/RkmEICfQp0rNxC 2R3T+4twwAR/cIF/LWkCXZD7Ef6KBygfr281AJjXMjjafl7PVETftUbYmJ7j9rDjyKGM AKiw== 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=XbVBncXQBymx/ieyPJ6HdMsSmxJ3fpUPvSQvKQ5bVDo=; b=qyQxWtJoH/HMQOkURjwikWHcgTSz82rKfg+wdjUxH0MPC3D9dw2t/gCaAu1B6MkQWo 00Q3JsyIMaTdX6vpQIqd+EbKsgV0d348GbLIUHsOt59r+Xid6pBboOoTdRMPabDqZcmB JKDCy0kcALvisULFKBzu8qN8Cb00cmrItlVimG7sElrdSfnfcLtIt9uHqlRubSNyw1Cc 6jbi27GWJmDWSiB/AFUj1A7ncsc2YAq6KCfJPOagjzaqC/vixZM3ExoNMOON2n4HeKJ2 cBOwd6JmOTlA5206A1xVPfUFo7xLyjhrAk0juk4l/0j+E+6EqyuZdYyJFj+CT0sxKjpD n5mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=SR5bX611; 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 k20si635206iog.64.2021.08.16.17.18.34; Mon, 16 Aug 2021 17:18:45 -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=SR5bX611; 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 S234864AbhHQAR6 (ORCPT + 99 others); Mon, 16 Aug 2021 20:17:58 -0400 Received: from conssluserg-03.nifty.com ([210.131.2.82]:36933 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232924AbhHQAR6 (ORCPT ); Mon, 16 Aug 2021 20:17:58 -0400 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 17H0Gwmh028866; Tue, 17 Aug 2021 09:16:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 17H0Gwmh028866 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1629159419; bh=XbVBncXQBymx/ieyPJ6HdMsSmxJ3fpUPvSQvKQ5bVDo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SR5bX611BWYbnFYeXtj/HbHiNhDrWtr2M96SyaS3aqdtaah7rB//1C28fqTs276VT BVSj6Zi3DWgvB5HBMEy+rT6PJBPx2rGqHgY/gvXyf1oKLmBjEUZJSSXhG9E3P7fACR uOJsTT2ldN/kKT717R4yLUDIpBkkiQJjPWamkr4jIspNLOcb5yGFK0EeTIamuJxY7J KYFxzIsygLSWOOCXtLGFxVC16r97VUIcQmX7BCiWfXGtDtawaSoqmQcSSuXzaRStyn e+L4wXzpGOmIi3V+J0YNegA1xpBLaQxUQXfqmjzbFIDmMmMG4kg9AcAApCBaqvGz3e 6MajQLiqghLew== X-Nifty-SrcIP: [209.85.214.172] Received: by mail-pl1-f172.google.com with SMTP id a20so22717082plm.0; Mon, 16 Aug 2021 17:16:58 -0700 (PDT) X-Gm-Message-State: AOAM531i0s613dsd/qcYXYXaCI2L8TR0pFnoex4tpKxlUtn2lLp/Y/sM h/WgL2yYANwaVDDOr9DYMtbBD7OL1NdHOcaXBQ4= X-Received: by 2002:a65:6459:: with SMTP id s25mr673098pgv.7.1629159418096; Mon, 16 Aug 2021 17:16:58 -0700 (PDT) MIME-Version: 1.0 References: <20210810204240.4008685-1-ndesaulniers@google.com> In-Reply-To: From: Masahiro Yamada Date: Tue, 17 Aug 2021 09:16:20 +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 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) Or, another way of implementation is KBUILD_CFLAGS += $(call cc-ifversion, -lt, 1000, --allow-store-data-races, --param=allow-store-data-races=0) > > (Either way, I need to send a v2 in response to Naresh's report as > well. https://lore.kernel.org/lkml/CA+G9fYtPBp_-Ko_P7NuOX6vN9-66rjJuBt21h3arrLqEaQQn6w@mail.gmail.com/ > It seems that -mfentry wasn't implemented for s390-linux-gnu-gcc until > gcc-9; so rather than remove top level support, perhaps a comment > about gcc-9+ s390 having support will make grepping for it easier in > the future). > -- > Thanks, > ~Nick Desaulniers -- Best Regards Masahiro Yamada