From d8308935db0f72734c51f6a1ec85ffa6ccffa6bc Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Wed, 11 Feb 2015 11:29:22 -0500 Subject: [PATCH] Fix perf build --- kernel.spec | 4 +++ ...e-_GNU_SOURCE-on-pthread_attr_setaff.patch | 30 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 perf-tools-Define-_GNU_SOURCE-on-pthread_attr_setaff.patch diff --git a/kernel.spec b/kernel.spec index fc86ca2b9..1cd19c025 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 000000000..4f8db0427 --- /dev/null +++ b/perf-tools-Define-_GNU_SOURCE-on-pthread_attr_setaff.patch @@ -0,0 +1,30 @@ +From: Josh Boyer +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 +--- + 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 +