Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Daniel Dadap <ddadap@nvidia.com>
To: linux-kbuild@vger.kernel.org
Cc: Daniel Dadap <ddadap@nvidia.com>
Subject: [PATCH] scripts: override locale from environment when running recordmcount.pl
Date: Wed, 24 Apr 2019 13:55:50 -0400	[thread overview]
Message-ID: <20190424175550.142553-1-ddadap@nvidia.com> (raw)

recordmcount.pl uses a set of regular expressions to parse the output of
objdump(1). However, if objdump(1) output is localized, it may not match
the regular expressions, thereby preventing recordmcount.pl from parsing
object files correctly.

In order to allow recordmcount.pl to function correctly regardless of the
current locale settings, set LANG=C when running objdump(1). LC_ALL is
already unset in the top-level Makefile, so it is not necessary to also
override that environment variable.

Signed-off-by: Daniel Dadap <ddadap@nvidia.com>
Reviewed-by: Robert Morell <rmorell@nvidia.com>
---
 scripts/recordmcount.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 68841d01162c..b7bcdc71e6e8 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -493,7 +493,7 @@ sub update_funcs
 #
 # Step 2: find the sections and mcount call sites
 #
-open(IN, "$objdump -hdr $inputfile|") || die "error running $objdump";
+open(IN, "env LANG=C $objdump -hdr $inputfile|") || die "error running $objdump";
 
 my $text;
 
-- 
2.18.1

             reply	other threads:[~2019-04-24 17:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 17:55 Daniel Dadap [this message]
2019-04-27  6:55 ` [PATCH] scripts: override locale from environment when running recordmcount.pl Masahiro Yamada
2019-04-27 15:08   ` Daniel Dadap
2019-04-27 15:21     ` [PATCH v2] " Daniel Dadap
2019-04-28  1:34       ` Masahiro Yamada

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=20190424175550.142553-1-ddadap@nvidia.com \
    --to=ddadap@nvidia.com \
    --cc=linux-kbuild@vger.kernel.org \
    /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