From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68683C433DF for ; Wed, 14 Oct 2020 15:31:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 120382222A for ; Wed, 14 Oct 2020 15:31:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LEVlwthT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730592AbgJNPbw (ORCPT ); Wed, 14 Oct 2020 11:31:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730000AbgJNPbw (ORCPT ); Wed, 14 Oct 2020 11:31:52 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DEBEC061755; Wed, 14 Oct 2020 08:31:51 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id k1so2416086ilc.10; Wed, 14 Oct 2020 08:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=y6L9dnyH9qjChqMXOLeU2OeYrzI2QqyeRonFJkp6Mw0=; b=LEVlwthTSz17/B7pjGComi0D7NiB4aOWa2yhyi0nAKS7Ht+IlrBG4FrqDKEeHbBq2g vyXWaEXglf488LQqoBD7Nceghs8WkzUGz3eVpK3cuvY7rHy9ByK6WnorJGb+u4TlNjGb KgF+xR6gb6WtUtwv/4ZaZvzR5M9s2fEXkXQLVmEGcmI8bqAxqnUvh77qnzJZrbnylxAf QzfG8SgqmjEDhkDcBSsGg69hVcNnEeNhfLlG/e1sdZ7SvaFU+utkUlusw5OIa18bJSzA WPH84UctX0DfFAymtc67Ljxu9b/aKJPaJdxluvfR7ZIxVnzEqqOfHt45W1zB63qUM+n4 MT0Q== 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:reply-to :from:date:message-id:subject:to:cc; bh=y6L9dnyH9qjChqMXOLeU2OeYrzI2QqyeRonFJkp6Mw0=; b=F5gQF/waBKcB2e4U95PtGUnuGyWvfdThT6aMY+Z/LzM0zstiDxxKJ/yX1lBy2x32Ah 7EsxDHUM0CiVhkN0/HqAzJQHwjUjawSBTG0GvVhGXPUjBY1zLuYdzSZcoiaXBEH9f06D R7FMFoLiEA7TUQRn3c54eAeB+n5G1w6WkBzDwFJ3TzPgr+OY3FNf1vfPGv8COIn4ZlZx 0qxX1O15AYxmZJEUvzqT2yuTBhPAhqa11p1RBBjXFRRNTzmhjjVp6nOWd+9LoVK2WQEB QgiD45rsVSTDAEaVpfWw3Rzh4tfgizyn4wXNuy81Si2yx/jfe8YcSXpGUrl2cK47Xr31 DgPQ== X-Gm-Message-State: AOAM5305RcemsAeH1qAzxTwRitIT71qCeSFz0zEkpOqfmeMAvtnitOam OFtmPan5/P8ECGR1rGUMPPk5DF1ESXnm9ANWx3s= X-Google-Smtp-Source: ABdhPJzywwnLk2/KInPqkQ+p+k8uxidWq5TG4qXLH4ewxB4lPCqPkD5zL5akFlar1En0dGf3kXolR3yiwoaeS5Cymlo= X-Received: by 2002:a92:7f05:: with SMTP id a5mr4614410ild.112.1602689510501; Wed, 14 Oct 2020 08:31:50 -0700 (PDT) MIME-Version: 1.0 References: <20201010215135.GB2666@wildebeest.org> <20201010220712.5352-1-mark@klomp.org> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Wed, 14 Oct 2020 17:31:39 +0200 Message-ID: Subject: Re: [PATCH] Only add -fno-var-tracking-assignments workaround for old GCC versions. To: Mark Wielaard Cc: Nick Desaulniers , Ian Rogers , Andi Kleen , linux-toolchains@vger.kernel.org, LKML , Peter Zijlstra , Stephane Eranian , Arnaldo Carvalho de Melo , Ingo Molnar , Jiri Olsa , Namhyung Kim , "Phillips, Kim" , Mark Rutland , Masami Hiramatsu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Mon, Oct 12, 2020 at 9:12 PM Mark Wielaard wrote: > > Hi, > > On Mon, 2020-10-12 at 11:59 -0700, Nick Desaulniers wrote: > > On Sat, Oct 10, 2020 at 3:57 PM Ian Rogers > > wrote: > > > On Sat, Oct 10, 2020 at 3:08 PM Mark Wielaard > > > wrote: > > > > -DEBUG_CFLAGS := $(call cc-option, -fno-var-tracking- > > > > assignments) > > > > +# Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801 > > > > +# for old versions of GCC. > > > > +DEBUG_CFLAGS := $(call cc-ifversion, -lt, 0500, $(call cc- > > > > option, -fno-var-tracking-assignments)) > > > > Should this be wrapped in: `ifdef CONFIG_CC_IS_GCC`/`endif`? > > I don't think so. It wasn't before. And call cc-option makes sure to > only add the flag if the compiler supports it (clang doesn't and it > also has a much higher version). > I am also in favour of `ifdef CONFIG_CC_IS_GCC` to clearly say this is a GCC bug. For the comment something like: # Workaround for GCC version <= 5.0 # GCC Bug: Think of people grepping in the Linux source code for supported or broken compiler (versions)... As a reference see ClangBuiltLinux issue #427 "audit use of __GNUC__". [2] says: "There's also a ton of __GNUC_MINOR__ checks against unsupported GCC versions." - Sedat - [1] https://github.com/ClangBuiltLinux/linux/issues/427 [2] https://github.com/ClangBuiltLinux/linux/issues/427#issuecomment-700935241