public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Artem Bityutskiy <dedekind1@gmail.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Paulo Marques <pmarques@grupopie.com>
Subject: Re: [PATCH 2/2] kbuild: move KALLSYMS_EXTRA_PASS from Kconfig to Makefile
Date: Mon, 04 Apr 2011 14:17:16 +0200	[thread overview]
Message-ID: <4D99B6CC.7080707@suse.cz> (raw)
In-Reply-To: <1301913651-9055-2-git-send-email-dedekind1@gmail.com>

On 4.4.2011 12:40, Artem Bityutskiy wrote:
> From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> 
> At the moment we have the CONFIG_KALLSYMS_EXTRA_PASS Kconfig switch,
> which users can enable or disable while configuring the kernel. This
> option is then used by 'make' to determine whether an extra kallsyms
> pass is needed or not.
> 
> However, this approach is not nice and confusing, and this patch moves
> CONFIG_KALLSYMS_EXTRA_PASS from Kconfig to Makefile instead. The
> rationale is below.
> 
> 1. CONFIG_KALLSYMS_EXTRA_PASS is really about the build time, not
>    run-time. There is no real need for it to be in Kconfig. It is
>    just an additional work-around which should be used only in rare
>    cases, when someone breaks kallsyms, so Kbuild/Makefile is much
>    better place for this option.
> 2. Grepping CONFIG_KALLSYMS_EXTRA_PASS shows that many defconfigs have
>    it enabled, probably not because they try to work-around a kallsyms
>    bug, but just because the Kconfig help text is confusing and does
>    not really make it clear that this option should not be used unless
>    except when kallsyms is broken.
> 3. And since many people have CONFIG_KALLSYMS_EXTRA_PASS enabled in
>    their Kconfig, we do might fail to notice kallsyms bugs in time. E.g.,
>    many testers use "make allyesconfig" to test builds, which will enable
>    CONFIG_KALLSYMS_EXTRA_PASS and kallsyms breakage will not be noticed.
> 
> To address that, this patch:
> 
> 1. Kills CONFIG_KALLSYMS_EXTRA_PASS
> 2. Changes Makefile so that people can use "make KALLSYMS_EXTRA_PASS=1"
>    to enable the extra pass if needed.
> 3. By default KALLSYMS_EXTRA_PASS is disabled and if kallsyms has issues,
>    "make" should print a warning and suggest using KALLSYMS_EXTRA_PASS
> 4. Add "make help" entry for KALLSYMS_EXTRA_PASS
> 
> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> Cc: Paulo Marques <pmarques@grupopie.com>
> Cc: Michal Marek <mmarek@suse.cz>
> ---
>  Makefile     |   13 ++++++++-----
>  init/Kconfig |   12 ------------
>  2 files changed, 8 insertions(+), 17 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index ba7a55c..b66a43a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -797,15 +797,16 @@ ifdef CONFIG_KALLSYMS
>  # o The correct .tmp_kallsyms2.o is linked into the final vmlinux.
>  # o Verify that the System.map from vmlinux matches the map from
>  #   .tmp_vmlinux2, just in case we did not generate kallsyms correctly.
> -# o If CONFIG_KALLSYMS_EXTRA_PASS is set, do an extra pass using
> +# o If 'make KALLSYMS_EXTRA_PASS=1" was used, do an extra pass using
>  #   .tmp_vmlinux3 and .tmp_kallsyms3.o.  This is only meant as a
>  #   temporary bypass to allow the kernel to be built while the
>  #   maintainers work out what went wrong with kallsyms.
>  
> -ifdef CONFIG_KALLSYMS_EXTRA_PASS
> -last_kallsyms := 3
> -else
>  last_kallsyms := 2
> +ifeq ("$(origin KALLSYMS_EXTRA_PASS)", "command line")

I would drop the origin check here. We use it for single-letter
variables that could be used outside the kernel with a different
meaning, but if you export KALLSYMS_EXTRA_PASS, then you certainly mean
the kernel's KALLSYMS_EXTRA_PASS.

Michal

  reply	other threads:[~2011-04-04 12:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-04 10:40 [PATCH 1/2] Kconfig: improve KALLSYMS_ALL documentation Artem Bityutskiy
2011-04-04 10:40 ` [PATCH 2/2] kbuild: move KALLSYMS_EXTRA_PASS from Kconfig to Makefile Artem Bityutskiy
2011-04-04 12:17   ` Michal Marek [this message]
2011-04-04 12:48     ` Artem Bityutskiy
2011-04-04 12:45   ` Valdis.Kletnieks
2011-04-04 12:47     ` Artem Bityutskiy
2011-04-04 15:22       ` Valdis.Kletnieks
2011-04-04 15:37         ` Artem Bityutskiy
2011-04-04 16:01           ` Paulo Marques
2011-04-04 15:47     ` Artem Bityutskiy
2011-04-04 16:22 ` [PATCH 1/2] Kconfig: improve KALLSYMS_ALL documentation Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D99B6CC.7080707@suse.cz \
    --to=mmarek@suse.cz \
    --cc=dedekind1@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmarques@grupopie.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox