All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: acme@redhat.com, namhyung@kernel.org, peterz@infradead.org,
	jolsa@kernel.org, mingo@kernel.org, linux-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org, linux-arch@vger.kernel.org,
	Alexey.Brodkin@synopsys.com
Subject: Re: [PATCH v2 5/5] perf tools: [uclibc] provide stub for pthread_attr_setaffinity_np
Date: Mon, 12 Jan 2015 12:04:43 +0100	[thread overview]
Message-ID: <20150112110443.GB26229@krava.redhat.com> (raw)
In-Reply-To: <1420888254-17504-6-git-send-email-vgupta@synopsys.com>

On Sat, Jan 10, 2015 at 04:40:54PM +0530, Vineet Gupta wrote:

SNIP

> @@ -198,6 +198,7 @@ CORE_FEATURE_TESTS =			\
>  	libpython-version		\
>  	libslang			\
>  	libunwind			\
> +	pthread-attr-setaffinity-np	\
>  	stackprotector-all		\
>  	timerfd				\
>  	libdw-dwarf-unwind		\
> @@ -226,6 +227,7 @@ VF_FEATURE_TESTS =			\
>  	libelf-getphdrnum		\
>  	libelf-mmap			\
>  	libpython-version		\
> +	pthread-attr-setaffinity-np	\
>  	stackprotector-all		\
>  	timerfd				\
>  	libunwind-debug-frame		\
> @@ -301,6 +303,10 @@ ifeq ($(feature-sync-compare-and-swap), 1)
>    CFLAGS += -DHAVE_SYNC_COMPARE_AND_SWAP_SUPPORT
>  endif
>  
> +ifeq ($(feature-pthread-attr-setaffinity-np), 1)
> +  CFLAGS += -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP
> +endif
> +
>  ifndef NO_BIONIC
>    $(call feature_check,bionic)
>    ifeq ($(feature-bionic), 1)
> diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
> index 53f19b5dbc37..e9b99bb29348 100644
> --- a/tools/perf/config/feature-checks/Makefile
> +++ b/tools/perf/config/feature-checks/Makefile
> @@ -25,6 +25,7 @@ FILES=					\
>  	test-libslang.bin		\
>  	test-libunwind.bin		\
>  	test-libunwind-debug-frame.bin	\
> +	test-pthread-attr-setaffinity-np.bin	\
>  	test-stackprotector-all.bin	\
>  	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,
			   ^
	In file included from bench/futex.h:72:0,
			 from bench/futex-hash.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-hash.o] Error 1
	make[1]: *** Waiting for unfinished jobs....
	In file included from bench/futex-wake.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,
			   ^
	In file included from bench/futex.h:72:0,
			 from bench/futex-wake.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-wake.o] Error 1
	In file included from bench/futex-requeue.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,
			   ^
	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

  reply	other threads:[~2015-01-12 11:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-10 11:10 [PATCH v2 0/5] Perf tool fixes for ARC + uClibc Vineet Gupta
2015-01-10 11:10 ` Vineet Gupta
2015-01-10 11:10 ` [PATCH v2 1/5] perf tools: [uclibc] fix statfs.f_type data type mismatch build error Vineet Gupta
2015-01-10 11:10   ` Vineet Gupta
2015-01-12 11:05   ` Jiri Olsa
2015-01-13  1:47     ` Arnaldo Carvalho de Melo
2015-01-13  4:49       ` Vineet Gupta
2015-01-17 10:11   ` [tip:perf/urgent] perf tools: Fix statfs.f_type data type mismatch build error with uclibc tip-bot for Alexey Brodkin
2015-01-10 11:10 ` [PATCH v2 2/5] perf tools: [uclibc] Elide strlcpy warning Vineet Gupta
2015-01-10 11:10   ` Vineet Gupta
2015-01-10 11:10 ` [PATCH v2 3/5] perf tools: [uclibc] Avoid build splat for syscall numbers Vineet Gupta
2015-01-10 11:10   ` Vineet Gupta
2015-01-12 11:09   ` Jiri Olsa
2015-01-12 12:00     ` Vineet Gupta
2015-01-10 11:10 ` [PATCH v2 4/5] perf tools: [uclibc] don't rely on glibc malloc working for sz 0 Vineet Gupta
2015-01-10 11:10   ` Vineet Gupta
2015-01-10 11:10 ` [PATCH v2 5/5] perf tools: [uclibc] provide stub for pthread_attr_setaffinity_np Vineet Gupta
2015-01-10 11:10   ` Vineet Gupta
2015-01-12 11:04   ` Jiri Olsa [this message]
2015-01-12 11:13     ` Vineet Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150112110443.GB26229@krava.redhat.com \
    --to=jolsa@redhat.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=acme@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.