Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp45442pxb; Tue, 12 Jan 2021 19:33:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyRx7dFjg0VEc4KiF41q/q1XYFq9Y+6r5xSiEfJuRHFl1FP5Aw8gt6pd5joG0JLQTFHAEE X-Received: by 2002:a05:6402:1c8b:: with SMTP id cy11mr172468edb.256.1610508833982; Tue, 12 Jan 2021 19:33:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610508833; cv=none; d=google.com; s=arc-20160816; b=iemGp2HqwavUmI1OookzzX4KuAb7yR79yKu1bzukpyr47mnFkYsUDcsRCpkGWGe+Nz ohpE4jMD7YwqEnudF0P0HULkebBZob1anj4fZ7vyJV8TU6VjPnNN+oplH/CYPT5UAeBt 9ZNK7El3jGUEZEeczJeAKZnudDREHhd5+0eCUj/Wbhz30RQliATNGJYCJNHezNtI1U0x XFdInI1tBCC/MdSQ4Kl/VJ8YJHHv0jGG8zyCEpOQO0Ctjts9BWXXmBE7lUSWGMqxAlYB G/vs0s/Gxubn7pldXTfIVkXDznvmmcXAmbkY9P+FaIOQ0aW+SLB2D8pv4anCl6lKr9XG I/tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :sender:dkim-signature; bh=5rko6s7/MxxtN4vVcBpBg113Pb8TIp2GhMMzMhRrSK4=; b=vZ62cyp4rYblKDQKre83kyig7Nwok52Dk1KcRUsApWuHKQtxEXF0hZHk2bPx3kWJm6 1NDnfO0IYAHnGDpYmrDjcuGKIz84WwO61fpty3milunB7nSlDVJZnkB3kZDt4oJio060 Us/qv/7oGyjdaHwbEgEFCGMhOmQ8RXQspcZL4S+41W5dvjSzEvwPZK0d5xt5Lg53n7Yp kygszGJgYWKNpBmXeZVh7xIHY/VbtLG3HY5NwiPV1Vtv+oXBFAZRv+x829XzVjAtohxz iYqGWwbF7QSkddVwH23ebSLrjQT5Ti62kdOBTeOJmMmDvLwmo56hBNGSLohOBDo4ZwAd U7IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="p4mDtQ/J"; 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 y24si362811edl.364.2021.01.12.19.33.30; Tue, 12 Jan 2021 19:33:53 -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="p4mDtQ/J"; 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 S2392389AbhAMAnL (ORCPT + 99 others); Tue, 12 Jan 2021 19:43:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392393AbhAMAd2 (ORCPT ); Tue, 12 Jan 2021 19:33:28 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C195AC061575 for ; Tue, 12 Jan 2021 16:32:47 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id m203so619547ybf.1 for ; Tue, 12 Jan 2021 16:32:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=5rko6s7/MxxtN4vVcBpBg113Pb8TIp2GhMMzMhRrSK4=; b=p4mDtQ/JWBQVcqiSngiVHj1RDJXheN9j4tRJZdYqOef3abOmLeMAEwfLvwCSZaq72V G+vUc4J+fzLAMEur0uasAO4tZTA5D+eRIvWKG6bK0GwnwBgnyCe/P3TDCE/ZVxj/33iW nI7HNKVv87dAHunABvsFKROzqxByZa2P1XtgX+yh6cVQuPHUtAiwQ78s1ui09zTayJbN HS2wFLIEu9gMfxL7BaqP8CrMPeoTys7pn1IOwKxGpH91mGB46UBdoqFiKjkGWXF6exUH pbPMt7PkH59Kw0zzF1wq9mDSqSdLTBVqOfplGUeTXNf3oKX3HMCJmxz7+IAUaLi6fvpE N41Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=5rko6s7/MxxtN4vVcBpBg113Pb8TIp2GhMMzMhRrSK4=; b=ecqvYsQTOJsn1tgynPqWQZ39wQkre/SfgRBCvY6InbJZnyGOHtIIgJ/oBeaS+AWKNe aZSOA+6S2Q/NNkrBTjJMwuf3YLDBC0nWlmNCaOlaQaJO+lTNWxe0n1YnRN4NobTgzGXJ /U2GZOa7pq7Lt5QbeOyWewAOmluWDNPF3Bg0d0XBqnolF5BQOwMIaWbxuhXgGG+O+ZXv 88diUrpDJYARgFKUttBpWshuzugQD0Igmr+CiGK6dykTEHcSWaTppOWlxMq8sj4Ka39M 9wscjVKSSb4ARhjA6tCVPsm1Kr3+XfLLO2o+S7g3ynZNGCAcrCcKAfPRXkUY4ZKLs66p nQFA== X-Gm-Message-State: AOAM532vHzt2CHR7rIvxJAzgCSzoXn73u47k9PvqTr3xMctyuMbP6PSg bkyzWDpKz8iIvUZ39FWxB/85uyAc8F/XxiYGtMs= Sender: "ndesaulniers via sendgmr" X-Received: from ndesaulniers1.mtv.corp.google.com ([2620:15c:211:202:f693:9fff:fef4:4d25]) (user=ndesaulniers job=sendgmr) by 2002:a25:9387:: with SMTP id a7mr3131575ybm.73.1610497966973; Tue, 12 Jan 2021 16:32:46 -0800 (PST) Date: Tue, 12 Jan 2021 16:32:32 -0800 Message-Id: <20210113003235.716547-1-ndesaulniers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog Subject: [PATCH v4 0/3] Kbuild: DWARF v5 support From: Nick Desaulniers To: Masahiro Yamada Cc: Nathan Chancellor , Andrew Morton , Sedat Dilek , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, Jakub Jelinek , Fangrui Song , Caroline Tice , Nick Clifton , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DWARF v5 is the latest standard of the DWARF debug info format. DWARF5 wins significantly in terms of size when mixed with compression (CONFIG_DEBUG_INFO_COMPRESSED). Link: http://www.dwarfstd.org/doc/DWARF5.pdf Patch 1 is a cleanup from Masahiro and isn't DWARF v5 specific. Patch 2 is a cleanup that lays the ground work and isn't DWARF v5 specific. Patch 3 implements Kconfig and Kbuild support for DWARFv5. Changes from v3: Changes as per Arvind: * only add -Wa,-gdwarf-5 for (LLVM=1|CC=clang)+LLVM_IAS=0 builds. * add -gdwarf-5 to Kconfig shell script. * only run Kconfig shell script for Clang. Apologies to Sedat and Nathan; I appreciate previous testing/review, but I did no carry forward your Tested-by and Reviewed-by tags, as the patches have changed too much IMO. Changes from v2: * Drop two of the earlier patches that have been accepted already. * Add measurements with GCC 10.2 to commit message. * Update help text as per Arvind with help from Caroline. * Improve case/wording between DWARF Versions as per Masahiro. Changes from the RFC: * split patch in 3 patch series, include Fangrui's patch, too. * prefer `DWARF vX` format, as per Fangrui. * use spaces between assignment in Makefile as per Masahiro. * simplify setting dwarf-version-y as per Masahiro. * indent `prompt` in Kconfig change as per Masahiro. * remove explicit default in Kconfig as per Masahiro. * add comments to test_dwarf5_support.sh. * change echo in test_dwarf5_support.sh as per Masahiro. * remove -u from test_dwarf5_support.sh as per Masahiro. * add a -gdwarf-5 cc-option check to Kconfig as per Jakub. Masahiro Yamada (1): Remove $(cc-option,-gdwarf-4) dependency from CONFIG_DEBUG_INFO_DWARF4 Nick Desaulniers (2): Kbuild: make DWARF version a choice Kbuild: implement support for DWARF v5 Makefile | 15 +++++++---- include/asm-generic/vmlinux.lds.h | 6 ++++- lib/Kconfig.debug | 41 +++++++++++++++++++++++++------ scripts/test_dwarf5_support.sh | 9 +++++++ 4 files changed, 58 insertions(+), 13 deletions(-) create mode 100755 scripts/test_dwarf5_support.sh -- 2.30.0.284.gd98b1dd5eaa7-goog