Skip to contentSkip to conversation

Patch "perf tools: Fix build failure on perl script context" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Nov 6, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

perf tools: Fix build failure on perl script context

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
perf-tools-fix-build-failure-on-perl-script-context.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From b581c01fff646b5075d65359c8667de9c667da9e Mon Sep 17 00:00:00 2001

From: Namhyung Kim <[email protected]>
Date: Tue, 2 Aug 2016 11:43:17 +0900
Subject: perf tools: Fix build failure on perl script context

From: Namhyung Kim <[email protected]>

commit b581c01fff646b5075d65359c8667de9c667da9e upstream.

On my Archlinux machine, perf faild to build like below:

CC scripts/perl/Perf-Trace-Util/Context.o
In file included from /usr/lib/perl5/core/perl/CORE/perl.h:3905:0,

                   from Context.xs:23:
  /usr/lib/perl5/core/perl/CORE/inline.h: In function :
  /usr/lib/perl5/core/perl/CORE/cop.h:612:13: warning: declaration of 'av'
                                  shadows a previous local [-Werror-shadow]
             AV *av =3D GvAV(PL_defgv);
                 ^
  /usr/lib/perl5/core/perl/CORE/inline.h:526:5: note: in expansion of
                                  macro 'CX_POP_SAVEARRAY'
         CX_POP_SAVEARRAY(cx);
         ^~~~~~~~~~~~~~~~
  In file included from /usr/lib/perl5/core/perl/CORE/perl.h:5853:0,
                   from Context.xs:23:
  /usr/lib/perl5/core/perl/CORE/inline.h:518:9: note:
                                  shadowed declaration is here
         AV *av;
             ^~

What I did to fix is adding '-Wno-shadow' as the error message said it's the cause of the failure. Since it's from the perl (not perf) code base, we don't have the control so I just wanted to ignore the warning when compiling perl scripting code.

Committer note:

This also fixes the build on Fedora Rawhide.

---
 tools/perf/scripts/perl/Perf-Trace-Util/Build |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/scripts/perl/Perf-Trace-Util/Build +3 -1
@@ -1,3 +1,5 @@
 libperf-y += Context.o
 
-CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default
+CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes
+CFLAGS_Context.o += -Wno-unused-parameter -Wno-nested-externs -Wno-undef
+CFLAGS_Context.o += -Wno-switch-default -Wno-shadow

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/perf-tools-fix-build-failure-on-perl-script-context.patch