Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2087981pxb; Fri, 29 Jan 2021 12:51:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEJURNeFFujUcU9F57sQDn1s4qUmo4laOZGAkZ29YyMWX4WQY1eg7bE5qWBOKYLLzYooy6 X-Received: by 2002:a50:b586:: with SMTP id a6mr7285251ede.206.1611953494999; Fri, 29 Jan 2021 12:51:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611953494; cv=none; d=google.com; s=arc-20160816; b=Y0oMlezC1xFDPNu5uH0APDLHHoIkXKG3cmdJn97vHtjQ9WfPRex4mUcbW7Eo+0fry8 ypBeC4Qd9EfL1NFBpwnnwT7egKQzVZpwCpFniNM0rj2Hz7w0bgOAsqbftmjmdHuVydIN DAD4DrX/CR+DMBGsp+eXH0IrT2Ryp7hxO4Cedcrv4z2fEATfnOh53yC5el+3t+O5w1YA hokKv1HzDzwHtBHK9H4E3IOG1CbjP7USUzF6MISzVCVE4rF6yyApIZA0/0oh7GKrpQt1 qw1/BwJHwCuU+fy+jSQGyr8f0jkwcCXZGxnfSeTJ6aGw4LIrwrUTyHWpZpzh9wsj87qS 5/XA== 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=WItJXETBomgA8w/2ueBIV7kTCBbgxOWkatab0l8rCFY=; b=L55dV1hBK4RGHiKcihgsjiPpj74dLtNFVK7ceNsWnFkIy/PQlJptvfv3n8dReE81iA nUwCUaNRTYVygIl9amjyfU4Eu7zMZiZMfNnA65jCZ7/rfaISP3ZKsvUDWS5B7Dg3HAZD RYQpPkczs2eGJGhCatiEbCPU8Y2SGL1pXtqYbzTX+LaiHY2xK7uQlY5ub/+fIGOjQPDf C5NOi46ahdM9TsehqWrEfLONlzYNTCKLCWpZsvd72dLwf3GrMxDcttFIUSxKQ0nOaVgv PGqlQYCtb/DsbtG44mxTFyUAtYv+SVAMC2eyIqJs0mu1IWlC6DL+3DpWYPxixnKq+0Hu qHlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FWGTJwlE; 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 d5si5964735edu.258.2021.01.29.12.51.10; Fri, 29 Jan 2021 12:51:34 -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=@google.com header.s=20161025 header.b=FWGTJwlE; 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 S233325AbhA2UuW (ORCPT + 99 others); Fri, 29 Jan 2021 15:50:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233287AbhA2UtD (ORCPT ); Fri, 29 Jan 2021 15:49:03 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12662C06174A for ; Fri, 29 Jan 2021 12:48:23 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id s15so5951339plr.9 for ; Fri, 29 Jan 2021 12:48:23 -0800 (PST) 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=WItJXETBomgA8w/2ueBIV7kTCBbgxOWkatab0l8rCFY=; b=FWGTJwlE42dDQ0SnnZkdoS6s6/HTp5h+AvF467f8GVYxX7NWFdv/2Qt148CE4vgNUy rzDp3VDnl4WtcgvJ8KGX0lT2ATT5hsSYlX9JmduMTpd6cSfskjOCJm1yY7/XRePGjMaQ F7Txz6uN45eJMfz7dEGIrP7uAb4YnHAuHnCEaCe2jb1ctNZRtJBKqh07AsFPAM4psU2U bPrfPftUUgpP1XjqBHOWZhQ9fXLqq+3DL+svX8W8V0fenqBhXmXrsKuLGXlNiYMQRJp0 S/VCN+tdHaoRcgnWeu7wp3UAObg+iZj4MEMn5yX+bueQEcEaTigD8XoVuI330F5ZGqRA To/A== 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=WItJXETBomgA8w/2ueBIV7kTCBbgxOWkatab0l8rCFY=; b=mW2gw3udRU7UtzPB4kVzYMrDhsOJTZXThXuIsUM42ZDaXiN+fdSPTafMFbDV2cx2oP kAsmNyePVeqWKoYsfpkXkj65MfBolhOtSe6x3YYncKNt1pOFlvNudwolXmd1zYMcac+X waIJHrQHMCbzSpGmDV/YlwGiRhnel0JSn7/2aFfIVKwMKv1oSSswTujnSKyL/3+oAo8p XcCfsePbOV7/LPrazNHQLAxSh/vDCsFviqu7660hdV4TQlB3oLzT6qFngzv/BUiUCohV dw1+gnqaZqr7VoL/vHUOM+DmkPnUlBawwU3yltA+L/eRI8jifY8HrIgg+DIB7JH3xXGm Jr7w== X-Gm-Message-State: AOAM531NdrWDDImaw4pGF1PTa8rtuWP5YQkJlUGxK+/CMnWnUoDDkESO pEQG+tO8hYue/dDyav+2NSgVqugajomBuZWOBrnGVA== X-Received: by 2002:a17:90a:8b82:: with SMTP id z2mr6157190pjn.25.1611953302456; Fri, 29 Jan 2021 12:48:22 -0800 (PST) MIME-Version: 1.0 References: <20210129194318.2125748-1-ndesaulniers@google.com> <20210129194318.2125748-3-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Fri, 29 Jan 2021 12:48:11 -0800 Message-ID: Subject: Re: [PATCH v6 2/2] Kbuild: implement support for DWARF v5 To: Sedat Dilek 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 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? > 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. -- Thanks, ~Nick Desaulniers