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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 4306FC433E0 for ; Fri, 29 Jan 2021 22:42:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DECEE64DF5 for ; Fri, 29 Jan 2021 22:41:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232548AbhA2Wl6 (ORCPT ); Fri, 29 Jan 2021 17:41:58 -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-Google-Smtp-Source: ABdhPJxxqSWmcS2u0GdRlUBZpwrKoGLxA4dwIVSLbDnrhVI7puVsnxjoZIe1FiW6E1ctsbz3NZwyDgh7L6bez8tFCrg= 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