Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2145987pxb; Fri, 29 Jan 2021 14:43:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJVHWpUmys+rTnvG+VzZ8l0dFmP6Tuuslh+MF2jhWz++jPGA7myvCHgrFu55PZlcyeHT8M X-Received: by 2002:aa7:ce87:: with SMTP id y7mr7748048edv.211.1611960186880; Fri, 29 Jan 2021 14:43:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611960186; cv=none; d=google.com; s=arc-20160816; b=lUo7f0rxB3unJRobEk/UKepUWAxnQGG0Q3+KAjWWuD6Hu3xsX3fkIwj5iOwToYhJUY Qk3m+AMM3p8WSxTHqsQGNzTxc2DM5OmIDAgQKn2Ctg89MBBNc0nQMs1onO5JDNSTQrOS cRzlnUIU+p+83sM1x0jy6YxmNsERDqgMmhA9SuXWA/gO5wTgLgZm8VNPUXW5/ObSjOZX 1ZXc3yhXXP8ol/rmZsp20UPvkxDuCDvAOX+5S8auSWfKI+JWj3WGs6swbbnfzfyaILfF QZ45ne1N5IgwsIzzMr8Xy2Dyjofib5vtZLVHkS7rbFzly0r3B9Nkli0F3Wkt0yOAoXN3 uE7g== 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=1UeqBHRfeHjW15Sm624b1sYTdp/IVH05rFvVMr6lwzw=; b=IcGUuVVEfIWPJscYurpRXo37pBpRW8122BFLsqDUHjg+vEXeOs2E++NU/9xE/nyRXA MnGZrSecGWaPxFcF6spVStCcRKDI3EiFpHOiKHvHERLFkfFUgIYc/ZDZR7VfIJGIAfTI H+DZM9RCeKgDZ1H5cqQPdx4ektl5G9acvgXxoD4hWAnusa7Q8cENg8snBViKgNfsn05Y 23N7egQG4NwiZIyGWDJzKoQ1JE1oSZq/xIhdhhG9IOlmHSX8v9SS/koo42/WRHxxWKRQ YT0KR+bc0W8fLmZxx+CqUBbXsx+JJoN3c82SqrTQZ0o7FHgeiGENOFW+Q9SabzAyDPMB JoWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XDPPMVwe; 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 s20si5509894eji.387.2021.01.29.14.42.42; Fri, 29 Jan 2021 14:43:06 -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=XDPPMVwe; 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 S231156AbhA2Wlq (ORCPT + 99 others); Fri, 29 Jan 2021 17:41:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230525AbhA2Wlg (ORCPT ); Fri, 29 Jan 2021 17:41:36 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2962C06174A for ; Fri, 29 Jan 2021 14:40:55 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id u11so6112958plg.13 for ; Fri, 29 Jan 2021 14:40:55 -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=1UeqBHRfeHjW15Sm624b1sYTdp/IVH05rFvVMr6lwzw=; b=XDPPMVweGFsPiqUYCdU0BDmKm9HJrsAxkWJhV6oiNOLzQqE+AcjzCOXKmC2hHVUl0Q tuV4pXeSe9wN16C92uURLv3+qULeweJxkF5TXe0xc7ZSWYPjDRtwUOnXeqxk4xTDLnBV IaCA0IS1PA13d6TVp3OZP/+4iOA2qnLkR0HY1EkWdcoql+6O4+pJla8zCg3jAfyM4+b5 17gDhXMiIi55wo/piDuJ+ZFUdw3vvbleGTe/kQDrCDg3hGMjFLNJcnPA8VONTwndKlMq rtNJgSfyKZy4YmKedLsOgNp0MeTPFfmSIO86uyC2B38XkBjvsYNAk4e703cBvNBk4htq mFqg== 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=1UeqBHRfeHjW15Sm624b1sYTdp/IVH05rFvVMr6lwzw=; b=TuoeNTXgy2O4jM6VBMc8acxLGlJ1CPSP5xpE/9wr5weWfoc+Mv7yObnMXOr6unmx2N ALD1qrxoZ/0/xumC9UDOTw3sAmu7NeYEhQ0+Xvyhq+3mgkKYbRS7KshDhkjF9y1QJZP9 ez+MG/ggkL9L97rzpVdNfX+Nzuncc9El+QHqNmRMRCazNGqgZpTrCUp2qXuth93rIG3e f3hZaJZc3Gkikhbna20Hp8q+V2cuIv+SnuAwu1sVXsUpkp6sdocVYNFZ8o2Yd/5DWbOU o1G63rI2JnaT4zLkeYUHfNBQjuUvBULEY2nBpytTUfCz7jUVR4ejBrN5Q0pWKsCvt14o HJQg== X-Gm-Message-State: AOAM533nxIX8lGZelREFlwt+LUwt70C/rXxPdMHXcrLyBq/npct549fG R0pQ6YsaKdKsrk2/WPWJpQDslXiM1n1atscmPMxBeQ== X-Received: by 2002:a17:902:ed94:b029:de:8844:a650 with SMTP id e20-20020a170902ed94b02900de8844a650mr6426596plj.56.1611960055108; Fri, 29 Jan 2021 14:40:55 -0800 (PST) MIME-Version: 1.0 References: <20210129194318.2125748-1-ndesaulniers@google.com> <20210129194318.2125748-2-ndesaulniers@google.com> <20210129201712.GQ4020736@tucnak> <20210129214137.GW4020736@tucnak> In-Reply-To: <20210129214137.GW4020736@tucnak> From: Nick Desaulniers Date: Fri, 29 Jan 2021 14:40:44 -0800 Message-ID: Subject: Re: [PATCH v6 1/2] Kbuild: make DWARF version a choice To: Jakub Jelinek , Arvind Sankar Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , Sedat Dilek , LKML , clang-built-linux , Linux Kbuild mailing list , linux-arch , Fangrui Song , Caroline Tice , Nick Clifton , Yonghong Song , Jiri Olsa , Andrii Nakryiko , Arnaldo Carvalho de Melo , Nathan Chancellor 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 1:41 PM Jakub Jelinek wrote: > > On Fri, Jan 29, 2021 at 04:32:32PM -0500, Arvind Sankar wrote: > > Given what Jakub is saying, i.e. it was previously impossible to get > > dwarf2 with gcc, and you get dwarf4 whether or not DEBUG_INFO_DWARF4 was > > It isn't impossible to get it, -gdwarf-2 works, it is just not a very good > choice (at least unless one knows some debug info consumer is not DWARF3 or > later ready). > Though, even gcc -gdwarf-2 will use many extensions from DWARF3 and later, > as long as there is no way to describe stuff in DWARF2. -gstrict-dwarf > option requests that no DWARF extensions are used. Playing with this in godbolt, it looks like the implicit default dwarf version changed from 2 to 4 in somewhere between the GCC 4.7.4 and 4.8.1 release. The precise version, and whether it was strictly that version or not doesn't matter much; the minimum supported version of GCC for building the kernel currently being 4.9 means that without specifying DEBUG_INFO_DWARF4, that all kernel developers regardless of toolchain and supported toolchain version have been building as DWARF v4 (implicitly, or explicitly). DWARF v2 is quite irrelevant then. Ok, so I think Arvind's suggestion of "make DEBUG_INFO_DWARF4 a menu option, just don't add a DEBUG_INFO_DWARF2" makes a lot of sense. Will drop DEBUG_INFO_DWARF2 in v7. -- Thanks, ~Nick Desaulniers