[kernel] Fix perf build

Josh Boyer jwboyer at fedoraproject.org
Wed Feb 11 16:29:50 UTC 2015


commit d8308935db0f72734c51f6a1ec85ffa6ccffa6bc
Author: Josh Boyer <jwboyer at fedoraproject.org>
Date:   Wed Feb 11 11:29:22 2015 -0500

    Fix perf build

 kernel.spec                                        |    4 ++
 ...Define-_GNU_SOURCE-on-pthread_attr_setaff.patch |   30 ++++++++++++++++++++
 2 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index fc86ca2..1cd19c0 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -618,6 +618,8 @@ Patch26132: nfs-don-t-call-blocking-operations-while-TASK_RUNNIN.patch
 #rhbz 1188074
 Patch26133: ntp-Fixup-adjtimex-freq-validation-on-32bit-systems.patch
 
+Patch26134: perf-tools-Define-_GNU_SOURCE-on-pthread_attr_setaff.patch
+
 # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel
 Patch30000: kernel-arm64.patch
 
@@ -1345,6 +1347,8 @@ ApplyPatch nfs-don-t-call-blocking-operations-while-TASK_RUNNIN.patch
 #rhbz 1188074
 ApplyPatch ntp-Fixup-adjtimex-freq-validation-on-32bit-systems.patch
 
+ApplyPatch perf-tools-Define-_GNU_SOURCE-on-pthread_attr_setaff.patch
+
 %if 0%{?aarch64patches}
 ApplyPatch kernel-arm64.patch
 %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does.
diff --git a/perf-tools-Define-_GNU_SOURCE-on-pthread_attr_setaff.patch b/perf-tools-Define-_GNU_SOURCE-on-pthread_attr_setaff.patch
new file mode 100644
index 0000000..4f8db04
--- /dev/null
+++ b/perf-tools-Define-_GNU_SOURCE-on-pthread_attr_setaff.patch
@@ -0,0 +1,30 @@
+From: Josh Boyer <jwboyer at fedoraproject.org>
+Date: Wed, 11 Feb 2015 10:30:58 -0500
+Subject: [PATCH] perf tools: Define _GNU_SOURCE on pthread_attr_setaffinity_np
+ feature check
+
+The man page for pthread_attr_set_affinity_np states that _GNU_SOURCE must
+be defined before pthread.h is included in order to get the proper function
+declaration.  Define this in the Makefile.
+
+Signed-off-by: Josh Boyer <jwboyer at fedoraproject.org>
+---
+ tools/perf/config/feature-checks/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
+index 42ac05aaf8ac..b32ff3372514 100644
+--- a/tools/perf/config/feature-checks/Makefile
++++ b/tools/perf/config/feature-checks/Makefile
+@@ -49,7 +49,7 @@ test-hello.bin:
+ 	$(BUILD)
+ 
+ test-pthread-attr-setaffinity-np.bin:
+-	$(BUILD) -Werror -lpthread
++	$(BUILD) -D_GNU_SOURCE -Werror -lpthread
+ 
+ test-stackprotector-all.bin:
+ 	$(BUILD) -Werror -fstack-protector-all
+-- 
+2.1.0
+


More information about the scm-commits mailing list