Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1912628rwb; Fri, 19 Aug 2022 11:33:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR5pxZPZ2xXnbzk7Le0b6LRzkIadQWfeOMPGMpOFkUi4nH7QgWcOi7b59YGWZTx20NjQggq4 X-Received: by 2002:a17:90a:53a4:b0:1fa:97eb:6f0a with SMTP id y33-20020a17090a53a400b001fa97eb6f0amr15589551pjh.54.1660934025491; Fri, 19 Aug 2022 11:33:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660934025; cv=none; d=google.com; s=arc-20160816; b=lEIN+SQ4WmNrRQF4qYgtcErC1cjYqpJmwt5HQ+XAEyifJjkozfWRDysxiUBsqj1sUV OtWZujDyydBderYd0Xz7fgZk9WS33bb71HMD4yp32d77FgrIfreq4P+dSlD1pgsCQ6U8 M3itZTtVSMyRgxb5BejWUCADDxwr0KSwhlUKO60m1WF911DjnEGyHM8yDyseP37ojqta STkkw5Is6GDKbLgixoZA1xSQvS7q0/SoFbvMBZBPXzUOxjstIGU/Z48izwRiKc2Vz+m8 AIyNqtrw5roVCERe2zRqZX/Cj6YxjRl8QZ7DLbBJqvm98ONk89+ioxMxGe3AIXTPgzF0 X57g== 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=5Ba40ee6mdV3GLMe4cToIGO5iaIyAuSfJaWNy2z3RjA=; b=FXhTyrh8w9yXO5sF1igRwyftrA3kbOW7qht4lRz5cJJuQGsY7yZYS/F+s5vN8OXg6O iILJt7L5HRl5gE/NU20ysK8U3E0Nwdsnd2drvrHZ9QKkUs/J6r+qtZ+e4R5TFYBFYft6 n+AfuSEbVrhUdShogQ5UY5+XfQgR1GafOMieFm4qfODD3V4CFsl0EVnfNa/VURQuErEB 7gNHyc8sguY+w63AHo4fwqhVlgPOS58u6cdfPeaEW7zi9N+P88E+bLRgu3CnCSAicBiA 9IM7RZsXp8JcgUf+MdWT94MKLkkM7A4wigiY1wXGy+HK+Qmir6M4qesXwo7TOs/fdIWA C2fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=b9TOPh+G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r3-20020a63ec43000000b004227041e9d2si4637730pgj.405.2022.08.19.11.33.33; Fri, 19 Aug 2022 11:33:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=b9TOPh+G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1350146AbiHSR6F (ORCPT + 99 others); Fri, 19 Aug 2022 13:58:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350559AbiHSR5m (ORCPT ); Fri, 19 Aug 2022 13:57:42 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59F0DAE9CE for ; Fri, 19 Aug 2022 10:42:20 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id q7so3327333lfu.5 for ; Fri, 19 Aug 2022 10:42:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=5Ba40ee6mdV3GLMe4cToIGO5iaIyAuSfJaWNy2z3RjA=; b=b9TOPh+GL55mFPaCalx5Qcpbj1gHR2dCIb4yq1YkHkXNAtRboaXo4RCrWm5NmcC7Xi B+jOh6+l/W5y70P2g7As3UAoNYQa4y6LW6/QDWA4ERfJJw74xOjNpqLOEYS56sXS/O9D pM2gTo481VfmGSTscHu3QOEDkXyI6k9ArMW2kC9/thl3WF2SGCgieIdtudrc9Po9pkYy +mEy1EOeckIzqVgJm89jcjCStC5l+/PRRvMNBz8zSQtBdJ9vlMW9n1dgygPBfcTSAUSE IgP9PimYAbcYfA8abmfhblys7sFndp1s5ZsqNI02Ykmunr2xWkuT6Lf79dvBVGEiyGsV 7xMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=5Ba40ee6mdV3GLMe4cToIGO5iaIyAuSfJaWNy2z3RjA=; b=AEIGfnQ61sZBcmCHtcHCMXx+28mkDgSVXlttd2IVbnLADXdbi2jk5oiClEnJWLKm1P BmM17XdhV4zHJx2/mRUIjuBlOsHWy4h5qbBlcypUpL44Al+q3tUmc2wzfkc15749Tflm 9NT68gGKifV5jpfio9NZvq2exRZnNaazsG8XGF6eQvfQer5pFTww5UuXPe7/9cymLx+I CrtuLrjkbVxiiTXxSKOS6G9zmjY5jo3e4qf5dHh172LB1mkvHkIWISu/6vwI6GB9zdXs 7ClDZP+ET3a+j8r+EZD6XSJ6h80lXCxmLJijvgMZxir7SKlLaNsGz5RoB1kXIYsp1Arb S/Xg== X-Gm-Message-State: ACgBeo0ieWdUsGVmesbw/r4VCBbYxNiQ0BFuhem1WCZ7zOXJsElRpMf5 SpsjlGk/X/ItZrlOtB3nZGsWJHDXd1IJ/zIK2vyCVXbt2QbB+w== X-Received: by 2002:a05:6512:b01:b0:48b:a065:2a8b with SMTP id w1-20020a0565120b0100b0048ba0652a8bmr2649945lfu.401.1660930938505; Fri, 19 Aug 2022 10:42:18 -0700 (PDT) MIME-Version: 1.0 References: <20220815013317.26121-1-dmitrii.bundin.a@gmail.com> In-Reply-To: <20220815013317.26121-1-dmitrii.bundin.a@gmail.com> From: Nick Desaulniers Date: Fri, 19 Aug 2022 10:42:06 -0700 Message-ID: Subject: Re: [PATCH v3] kbuild: add debug level and macro defs options To: Dmitrii Bundin Cc: masahiroy@kernel.org, akpm@linux-foundation.org, dan.j.williams@intel.com, edumazet@google.com, isabbasso@riseup.net, jpoimboe@kernel.org, keescook@chromium.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk, maskray@google.com, michal.lkml@markovi.net, nathan@kernel.org, peterz@infradead.org, vbabka@suse.cz Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 14, 2022 at 6:34 PM Dmitrii Bundin wrote: > > Adds config options to control debug info level and producing of macro > definitions for GCC/Clang. > > Option DEBUG_INFO_LEVEL is responsible for controlling debug info level. > Before GCC 11 and Clang 12 -gsplit-dwarf implicitly uses -g2. To provide > a way to override the setting with, e.g. -g1, DEBUG_INFO_LEVEL is set > independently from DEBUG_INFO_SPLIT. > > Option DEBUG_MACRO_DEFINITIONS is responsible for controlling inclusion > of macro definitions. Since Clang uses -fdebug-macro to control if macro > definitions are produced which is different from GCC, provides a > compiler-specific way of handling macro inclusion. The option is handled > after DEBUG_INFO_LEVEL since -g3 -g2 implies -g2, but -g2 -g3 implies > -g3 and GCC uses -g3 to produce macro definitions. > > Signed-off-by: Dmitrii Bundin > --- > > Changes in v2: https://lore.kernel.org/all/20220804223504.4739-1-dmitrii.bundin.a@gmail.com/ Is any of this really necessary? It seems like a great way to bloat vmlinux artifacts built with CONFIG_DEBUG_INFO even further. The above link mentions "when debugging with GDB." In that case, please don't add new Kconfigs for these; just set -g3 when CONFIG_GDB_SCRIPTS=y. -- Thanks, ~Nick Desaulniers