Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp619350pxb; Mon, 16 Aug 2021 13:12:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKAVEvmrkY70ZxX+ZSB3Eykxxw0ftdQc+UiaHoXxepF/d1NwtPDn/h+MYHW66snuEUV8tE X-Received: by 2002:a02:9f17:: with SMTP id z23mr378835jal.86.1629144766473; Mon, 16 Aug 2021 13:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629144766; cv=none; d=google.com; s=arc-20160816; b=jjCg+JsoepjWSCqbe9jm5cViBMuw0y8Ph9Cy5ypS753ZaFnaUmybp9qPA7DFvaB/gb t0SwRQ0kIFzS0+e5uQQ+F0pNPSoaw5ivm0KRRqtjHIJ2pgg7ZK2w7O3lf7l3tOzjuCCp IzTMgygo6x/NFo6IUKHXRxLUfYKcXpcss+dexNcDpXz+UK7436PQigfM7uw1wNJGOSvQ BeG4b8zg0q7i0FteNL60423O8tnTWNBSzFGFgH7/4Fisb+RqlZJRmlQvi7Zg5gcEDDqf fh7zk/zKa3QSz5h7e3SorD+vpmXBZ4fScDmVKrAPTQCzk00m0D26JWrhFfon2RJoskG9 VVSw== 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; bh=78/zU1JmXsLtOegDV7vdLvXhJXsUYGL1XAvIUm761Yo=; b=KS2Qpz9hvSJ4NwPRoE7ER5nAVioP0vGrK6fyeKi0Y+EKe3QoOEZFg8hGm3zjo4p5oQ MY6g3wzpomWCDEDco2nCHRtlBw/MlqxfoI85AkndnMut/UiIBQjURftYHN9pc1cMhHtk vr053zFL+X/LMKc0/0yw2HmTew7t0xqxC+fQPZSo+KgU5mLEJzCavMZIePnEbOPTwt7b fCma8ATIHOUUhhy5rL/IoKx70/Qzs5hIAGvsqMJPaGUJ1NZQzU7dVFr/TQd/VX1D9R2r 9G7fcxbo8UzT7EJKwjvQc518zK56Lo8a4EpAu/c5y1/fMnXbne0ETR6jWsvcnMz8MaDh 8a9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FDEZeluL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id az16si406658jab.108.2021.08.16.13.12.34; Mon, 16 Aug 2021 13:12:46 -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=@google.com header.s=20161025 header.b=FDEZeluL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231587AbhHPULy (ORCPT + 99 others); Mon, 16 Aug 2021 16:11:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231509AbhHPULv (ORCPT ); Mon, 16 Aug 2021 16:11:51 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61316C061764 for ; Mon, 16 Aug 2021 13:11:19 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id x7so29084994ljn.10 for ; Mon, 16 Aug 2021 13:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=78/zU1JmXsLtOegDV7vdLvXhJXsUYGL1XAvIUm761Yo=; b=FDEZeluLRk7Bl4c5VqHicTN3BqcLo6Yh8vV12hPQhddXPlAys761JuA6DKnR7zAl0h gHDDz6FiwQpMOBXfHzE0VZGhCjMQ7P4lmw2vXkT817a+rW0PY3MMLwRB0fWl/45CeOfs TbRcn5llqM6dSw3aKuIP1/oAUASt3c9SUyNiJHbKU4Z2P2951lD+oZElRpLJwJrt7+Vd 2GrXR/9ActPhDLPCkxXAUa1BUZlBLG18D2oOXFJgSggi7Lkb27pBrOd46z8TTqeiSFY2 Rftxwr5u3dtVz/hYax6KNcikFUDuimKAA/7EykaNMqktyChnSW0g18AW7jDYAF1FHAqi jmpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=78/zU1JmXsLtOegDV7vdLvXhJXsUYGL1XAvIUm761Yo=; b=j3FzN/0dkyeRT+BN4mRso38ZBo1+sVOt+0FadcShCTG9OjfTBjvqeDHr4fdN1fJPJP qJ9OQY1zMeQLzBrEEhRci1xfj913kTe0vnO/5lj4aN8vyngB0CxD0TzGkAYCFZ7fpZ2v /IG8nou3bw2a3CZBCUaLuOeujLlaNh+68sdrhbSlbsQV3z7xBB47NoWkRYQQe7xxutZK Yj41XMkJBx0HvcAn4TqUdopDyqAvlSB608uMWhrLoe157fVGVXDO7ySOFLtpwH6MFVfO wuMO2pTcxBJZe8f2C614KODnen9ktovr5N+qwXgS5Uy6I+nwHqd5TH+sXeA1kCTeJcc0 oeDw== X-Gm-Message-State: AOAM5327x1EFk8TrKoGtpww7T4ESiY/7zUfy6kzLEg1VMYR2DSmcHyxQ r6DQK7WRwZJb7PC4XM2FPa5RkMmOD8Z70bp/xFfM+Q== X-Received: by 2002:a2e:a784:: with SMTP id c4mr274732ljf.479.1629144677387; Mon, 16 Aug 2021 13:11:17 -0700 (PDT) MIME-Version: 1.0 References: <20210810204240.4008685-1-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Mon, 16 Aug 2021 13:11:06 -0700 Message-ID: Subject: Re: [PATCH] Makefile: remove stale cc-option checks To: Masahiro Yamada 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 16, 2021 at 1:06 PM 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: > > > > > > diff --git a/Makefile b/Makefile > > > index 027fdf2a14fe..3e3fb4affba1 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -798,7 +801,7 @@ include/config/auto.conf: > > > endif # may-sync-config > > > endif # need-config > > > > > > -KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) > > > +KBUILD_CFLAGS += -fno-delete-null-pointer-checks > > > KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) > > > KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation) > > > KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow) > > > @@ -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 > > So it looks like `-fallow-store-data-races` was also supported. Reading through > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97309 > https://gcc.gnu.org/wiki/Atomic/GCCMM/ExecutiveSummary > it seems that the default is not to allow "store data races." So I > should not be adding `--allow-store-data-races` or > `-fallow-store-data-races`; so this just should be the existing test, > with a comment that it can be removed once gcc-10+ is the minimum. > Will update that in v2. Ah, perhaps I should combine the following line: KBUILD_CFLAGS += $(call cc-option,-fallow-store-data-races,--param=allow-store-data-races=0) Though I don't understand the csky failure. cc-option appends to a running list of flags; if an unsupported flag gets added to CFLAGS, it can cause cc-option to failure subsequent checks in spooky ways. I usually debug those by adding print statements to cc-option to see what the full command it's testing; then invoke the compiler manually with those to see what went wrong. (bookmarked and referenced often: https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile) Though my distro doesn't package csky-linux-gnu-gcc... -- Thanks, ~Nick Desaulniers