Thread (13 messages) 13 messages, 3 authors, 2015-01-13

Re: [PATCH v2 5/5] perf tools: [uclibc] provide stub for pthread_attr_setaffinity_np

From: Vineet Gupta <hidden>
Date: 2015-01-12 11:13:25
Also in: linux-perf-users, lkml

Hi Jiri,

On Monday 12 January 2015 04:35 PM, Jiri Olsa wrote:
quoted hunk ↗ jump to hunk
On Sat, Jan 10, 2015 at 04:40:54PM +0530, Vineet Gupta wrote:

SNIP
quoted
[SNIP]
 	test-timerfd.bin		\
 	test-libdw-dwarf-unwind.bin	\
@@ -47,6 +48,9 @@ test-all.bin:
 test-hello.bin:
 	$(BUILD)
 
+test-pthread-attr-setaffinity-np.bin:
+	$(BUILD) -Werror
this does not works for me unless I add -lpthread (check patch below)
is it possible you pushed that through LDFLAGS?

otherwise I'm getting following error:
	---
	In file included from bench/futex-hash.c:17:0:
	bench/futex.h:73:19: error: conflicting types for ‘pthread_attr_setaffinity_np’
	 static inline int pthread_attr_setaffinity_np(pthread_attr_t *attr,
[snip]
			   ^
	In file included from bench/futex.h:72:0,
			 from bench/futex-requeue.c:17:
	/usr/include/pthread.h:407:12: note: previous declaration of ‘pthread_attr_setaffinity_np’ was here
	 extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
		    ^
	make[1]: *** [bench/futex-requeue.o] Error 1
	make: *** [all] Error 2
	---

my system is x86_64 on F20

thanks,
jirka

diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index e9b99bb29348..42ac05aaf8ac 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
+	$(BUILD) -Werror -lpthread
 
 test-stackprotector-all.bin:
 	$(BUILD) -Werror -fstack-protector-all
Right - that fix is indeed needed to make it pass. Thing is, with my uClibc config
it always fails - so I couldn't make it fail because of this reason :-)

I'll add that hunk in v3.

Thx,
-Vineet
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help