Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2091424pxb; Fri, 29 Jan 2021 12:59:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJx44eolTnhTAsFdULNfdPg1lrv89Ki5NAptQZuX2BHqI4G7QS5/pR+clTdzKc0wkds/Fy5c X-Received: by 2002:a17:906:9616:: with SMTP id s22mr6503338ejx.270.1611953947585; Fri, 29 Jan 2021 12:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611953947; cv=none; d=google.com; s=arc-20160816; b=POqemN56s2VopQlnopG5t1I+JAm4XcFJwZxHDueHRNqaB44SEQ9T5m3eLXYtaUhP1r HtLb2e9m9EAKDCTjDG2KIA3vLAr8jyFAAwtpsJAHbMMJgZ84bUHHXYU64LNR8BJXRFY7 rk65HlUdy43I/ZXvZ6yi3x4ePvwQMdvI79CefTVUx6ISEmZudpyebUTJeZqauteO4xXv GDLOWFxNLFqrjTZOcaDImD7MwEvKi7kKN6ycHAm6ELguJWRCCSIMvhENLve8o4kam+am 3w+UUkaSD3bai1DJMRIMT6z5KWKqUq7aLg2g6yFXm4MsDIZBHhWRWLeYyoh5e1RB+0OX TWiA== 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:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=RAB/7SMuviSugZyMHckwTYODLUsFbrHRwIWe2DaL/Ck=; b=f9ltimzW9Q8ROb/6mODNpAGokecnyB8OGG96SLlwHK2B/6aeHNIttX29w3ZJ7dVDLV QkWYrYYKWNlC8EhTePF9bp7nJcw4MD9cLw59dl/r3Sl880SzysymY+Zfudz4Dr40izqj Yjw/k5Q2DvzSK3+GLae+UDd5E3V2O3npfeCKXir3lrUIMwtCuAyE1EbjtTNW8QqRGWwX t06dqnp0I/eMNI4krbvQEgx4GLaMLqX/+xx8C7xyFPEqwxvYbWzyyOGCAeyUuhm7NnHv tEM73EPzbuKRDUsFLXWX4EN4jpxsWw+HAKuGCVBPcsR4AysDgmmubZ25FuBdzwXIqGuD a8dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DleAjbNi; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e22si6321878edu.9.2021.01.29.12.58.43; Fri, 29 Jan 2021 12:59:07 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=DleAjbNi; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233250AbhA2Uzy (ORCPT + 99 others); Fri, 29 Jan 2021 15:55:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233055AbhA2Uzw (ORCPT ); Fri, 29 Jan 2021 15:55:52 -0500 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95483C061573; Fri, 29 Jan 2021 12:55:12 -0800 (PST) Received: by mail-io1-xd2b.google.com with SMTP id h11so10703078ioh.11; Fri, 29 Jan 2021 12:55:12 -0800 (PST) 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=RAB/7SMuviSugZyMHckwTYODLUsFbrHRwIWe2DaL/Ck=; b=DleAjbNiLstKJxSwB41b4bvQyMQ3GjuJu7/DKedLNAaZvIIdOFBa0ZBEZ0G7YNciQT +WcKLdKShVv8IEd1nSxslO5ukipNzJMoTo7IJ9EnX/HJpp4Db28R4Oc5EgYYIz+CHhgC 2Leg5DR+NvSitCDqYTaOmIF2fIFhtqrODojsl9a9D9fJzHXj3dOFHfd4C5WJrJVG6ybD cm91uu/knWuJ9bkPqYNseM4UYVJEHSs3IecOqh1DptVuuSj7IGj8J/JFW0wkavu7rt+g dHNdMIv+Hpczq7kNSWCcvuEpgmKez3H7G7E696vuskhQQ3vAdG17++ci1OyUWsJNnA/j yVqQ== 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=RAB/7SMuviSugZyMHckwTYODLUsFbrHRwIWe2DaL/Ck=; b=g10LdKkmz4aC7IyDghcW6iaeFFL44J1dXGaXvzv6wCuNbLi94BWXrdSE4wWXLDmPKQ 8kb6SgJogJ3kxbugmsAR9wfXX/sOkk7xpjtozgXXhcpVwLYY9RIi5ZtmT1tMKpSCw/G7 3+3vkvdd6kE0LE42rcXfSKBnaqIMIEZqvFEU3IVE1gOyu0fEifET3FG7Q3VzJqB+s/uR X2YW15Ih3ByLMW6CL+QOSTFPtqP97g8wmpppsKtGXjzm0uQEdKet+K2Ve5Ub9KDvHtv7 KCfluxqoJ8R0vMKwb4ZzXRmskn9PYqp+0kNpIvBNbwfMhO6F89AeZn2UKdPJi1uJXvMY dZ3Q== X-Gm-Message-State: AOAM532N2Q9BG6jQbh3r2vAYKXW7XuAOvzUZbHOpQvY7Fb4mLJUxSZ9i VJXBaJ9BZNRhbZcizx/CvwdnhPxXNuc3YH7bPyo= X-Received: by 2002:a05:6638:2694:: with SMTP id o20mr5269898jat.132.1611953711975; Fri, 29 Jan 2021 12:55:11 -0800 (PST) MIME-Version: 1.0 References: <20210129194318.2125748-1-ndesaulniers@google.com> <20210129194318.2125748-3-ndesaulniers@google.com> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Fri, 29 Jan 2021 21:54:58 +0100 Message-ID: Subject: Re: [PATCH v6 2/2] Kbuild: implement support for DWARF v5 To: Nick Desaulniers Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , LKML , Clang-Built-Linux ML , Linux Kbuild mailing list , linux-arch , Jakub Jelinek , Fangrui Song , Caroline Tice , Nick Clifton , Yonghong Song , Jiri Olsa , Andrii Nakryiko , Arnaldo Carvalho de Melo , Arvind Sankar Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2021 at 9:48 PM Nick Desaulniers wrote: > > On Fri, Jan 29, 2021 at 12:41 PM Sedat Dilek wrote: > > > > On Fri, Jan 29, 2021 at 8:43 PM Nick Desaulniers > > wrote: > > > > > > diff --git a/Makefile b/Makefile > > > index 20141cd9319e..bed8b3b180b8 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -832,8 +832,20 @@ endif > > > > > > dwarf-version-$(CONFIG_DEBUG_INFO_DWARF2) := 2 > > > dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4 > > > +dwarf-version-$(CONFIG_DEBUG_INFO_DWARF5) := 5 > > > DEBUG_CFLAGS += -gdwarf-$(dwarf-version-y) > > > > > > +# If using clang without the integrated assembler, we need to explicitly tell > > > +# GAS that we will be feeding it DWARF v5 assembler directives. Kconfig should > > > +# detect whether the version of GAS supports DWARF v5. > > > +ifdef CONFIG_CC_IS_CLANG > > > +ifneq ($(LLVM_IAS),1) > > > +ifeq ($(dwarf-version-y),5) > > > +DEBUG_CFLAGS += -Wa,-gdwarf-5 > > > > I noticed double "-g -gdwarf-5 -g -gdwarf-5" (a different issue) and > > that's why I looked again into the top-level Makefile. > > That's...unexpected. I don't see where that could be coming from. > Can you tell me please what is the precise command line invocation of > make and which source file you observed this on so that I can > reproduce? > That's everywhere... $ zstdgrep --color '\-g -gdwarf-5 -g -gdwarf-5' build-log_5.11.0-rc5-8-amd64-clang12-lto.txt.zst | wc -l 29529 > > Should this be...? > > > > KBUILD_AFLAGS += -Wa,-gdwarf-5 > > No; under the set of conditions Clang is compiling .c to .S with DWARF > v5 assembler directives. GAS will choke unless told -gdwarf-5 via > -Wa,-gdwarf-5 for .c source files, hence it is a C flag, not an A > flag. A flags are for .S assembler sources, not .c sources. > You are right. I mixed again C and A flags. - Sedat -