ACK: [PATCH 1/1] scripts: override locale from environment when running recordmcount.pl

Stefan Bader stefan.bader at canonical.com
Mon Jul 1 09:27:36 UTC 2019


On 28.06.19 07:58, Kai-Heng Feng wrote:
> From: Daniel Dadap <ddadap at nvidia.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1828084
> 
> 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 at nvidia.com>
> Reviewed-by: Robert Morell <rmorell at nvidia.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> (cherry picked from commit e46b94d228458aefc2553ee7c34ab18c2e3288e3)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---
>  scripts/recordmcount.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index 68841d01162c..ffea46287f83 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, "LANG=C $objdump -hdr $inputfile|") || die "error running $objdump";
>  
>  my $text;
>  
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20190701/90b35ae6/attachment.sig>


More information about the kernel-team mailing list