Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2897144rwa; Mon, 22 Aug 2022 16:24:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR4xJpvJ3cN5z/GCM606kNOYGZeTCiw1S2rvUOwfWLVP6/CJVumF2iKQxlXm6dJun0X455YT X-Received: by 2002:a17:907:d8d:b0:73d:538a:cb87 with SMTP id go13-20020a1709070d8d00b0073d538acb87mr10781639ejc.368.1661210671251; Mon, 22 Aug 2022 16:24:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661210671; cv=none; d=google.com; s=arc-20160816; b=t3G6xEivfAgvnYnTX6J38ysp0C27qca591AisNiXl/VaGomarC7RsbDUOo1bvvPVHX THtOWSm4LG6oDOgYKFN2uN+WgLJgUJPQs3dqv3pky0H9rvbD1K3w385BP3hG1HJAshoN FKsk6gkmjViIBD4EI5RHt4hiRxNP49NTxAu0DRcDOyF8ic7SQcgSx3+GuEWGTlBdzpd2 zPFgmAP8Bxdn7TeECLFh/fK+rqgvjGGf7E/68Cu87tV15YnmFhji6WQNS9TPWI083whR GzW8hNlT2F/c+ek+n1r/N8xbsi1ra5t9JkXhQGETennXpIdbaGILNbMWt8YAYwDVuwaX KRwA== 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=HSdoxsJ0k6gi0gsdGDs4RmvY3VdrRt/X1WP13pkBsqU=; b=cRdfNKAqBrMeKwYrDslW0eN4nrAVy2dUL9w18k5i96cw8fwkDmR9H+IP3ntKqXnoiQ 7OVwx6fOZt/YXoqjnidkvIfZ/puWJXKLLxqg1piyX80fiANgFioC+2q1avUoufGdOGhw uNGxetyaClMRzY8f0ITFGBR3P7BXx8ZXCrGZMPQaKl0PWCcjF31RBtkYeMVis872YVnq ybIieEiasA9n0aiDSMozs4NR51p7v3UEmC7TZ0j0bFrUhZSurUMS6lwKc6+neliOedUv dGii32Zr1+0GF9m08cByXaUyQsQIjDUqJDtTA4Dp6lOf8YU6tVCXNBPebef1R2+ThC2g ALIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C3O0dWqK; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a50d716000000b0043cd8cf001asi669790edi.169.2022.08.22.16.24.04; Mon, 22 Aug 2022 16:24:31 -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=@gmail.com header.s=20210112 header.b=C3O0dWqK; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238521AbiHVWm4 (ORCPT + 99 others); Mon, 22 Aug 2022 18:42:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237790AbiHVWmy (ORCPT ); Mon, 22 Aug 2022 18:42:54 -0400 Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37CF95141B; Mon, 22 Aug 2022 15:42:53 -0700 (PDT) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-33365a01f29so334613457b3.2; Mon, 22 Aug 2022 15:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=HSdoxsJ0k6gi0gsdGDs4RmvY3VdrRt/X1WP13pkBsqU=; b=C3O0dWqKjUV3GXIxPrazUCrC1qZ8vJXzfPUCnaeFt/paXuYseHJFcPGlmSxCM14FGF WJbmQlxGHA2MgIuv+R+K5DzQkVq8q6aSUY/f6hG8Xr9LTg/y31VSixfUpY72oo5SjjOE egfTtL0WveMBMQE1lZgccfd5I4v6eFLVO9C/BIosaS50mLcQuMN7ImL6MMihx7HYao7o TiQS65HRw+zHe7q0hZ5iVJIZhZMikl588HNHGk/AM7peHpw8OiF6HBUCCWBaxvBufxgs 5kE7xT5n8cdsBza4ZP1G1jXZj4o+sq9t+ozeeWlSqN3PovjjkP7tZb3ptMxUa5A0O5r6 HygA== 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=HSdoxsJ0k6gi0gsdGDs4RmvY3VdrRt/X1WP13pkBsqU=; b=MurVcqXqDcgMGJ8Psbme+rkLG9NcEJhKnHE6AlMSsyWvK35bwqX5+La3d2wGGUKtB0 Sx+pY10DGTRWiGCgDsrdEQq+b6ZLCp/QsprMi+Q/49Id46kXnCV534t88tfmw51XLWui Q/91DGeyrNzHj2Okg9sTp3aQMR9hWBeuUrTp2sGW++4wlD1D9iYSqQPdaiimtZLzgHpy lkX9qnGPELVGFb8IYUW137wcNSzL9X9uv0lPaHHvythap8HWFe3XqBpiu7OUYRDTaRbX AQoUVC8f2OhxoDLNY980gkN7Kh17PlQ55VSTFyJ/6NHDnhccXDkO+vCT48TyWStl02rb iVmA== X-Gm-Message-State: ACgBeo1aiYfCbNuGh0xREM9sZSerrQTKc8t+vp5sBW3PlQGvES9ogfu1 wS96g6FyjfrBUpkg0jUbftHlvzRRkVuJ4bmpNzU= X-Received: by 2002:a25:8a85:0:b0:671:715e:a1b0 with SMTP id h5-20020a258a85000000b00671715ea1b0mr21425930ybl.98.1661208172405; Mon, 22 Aug 2022 15:42:52 -0700 (PDT) MIME-Version: 1.0 References: <20220815013317.26121-1-dmitrii.bundin.a@gmail.com> In-Reply-To: From: Dmitrii Bundin Date: Tue, 23 Aug 2022 01:42:41 +0300 Message-ID: Subject: Re: [PATCH v3] kbuild: add debug level and macro defs options To: Nick Desaulniers Cc: Masahiro Yamada , Andrew Morton , Dan Williams , Eric Dumazet , Isabella Basso , Josh Poimboeuf , Kees Cook , Linux Kbuild mailing list , Linux Kernel Mailing List , Rasmus Villemoes , Fangrui Song , Michal Marek , Nathan Chancellor , "Peter Zijlstra (Intel)" , Vlastimil Babka Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Tue, Aug 23, 2022 at 12:36 AM Nick Desaulniers wrote: > > or perhaps that simply needs to be `-g -gsplit-dwarf`? In which case, > that if/else could just be re-arranged. How about simply assigning DEBUG_CFLAGS := -g at the very beginning without any conditions? This would provide the default with the possibility of overriding later and -gsplit-dwarf does not necessarily come with -g implicitly. > Honestly, I really don't think we need to be wrapping every compiler > command line flag under the sun in a kconfig option. This indeed sounds reasonable to me. So the key point here is to not bloat the kconfig with options related to every compiler flag. But I think it still might be useful to provide some option that would include sort of full debug information compilers may produce. With this approach there would be, in fact 3 different levels of debug information supported by Kconfig: reduced, default and full. The full level would increase everything like -g3, and -fdebug-macro for Clang, and probably others. > Or add -g1 to CONFIG_DEBUG_INFO_REDUCED. I ran some tests and there was indeed some decrease in size. That combination probably might be useful. Any thoughts? Regards Dmitrii