public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Josh Boyer <jwboyer@fedoraproject.org>,
	Jiri Olsa <jolsa@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Vineet Gupta <Vineet.Gupta1@synopsys.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 2/7] perf tools: Define _GNU_SOURCE on pthread_attr_setaffinity_np feature check
Date: Wed, 25 Feb 2015 18:05:35 -0300	[thread overview]
Message-ID: <1424898340-26968-3-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1424898340-26968-1-git-send-email-acme@kernel.org>

From: Josh Boyer <jwboyer@fedoraproject.org>

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.

Without this defined, the feature check fails on a Fedora system with
gcc5 and then the perf build later fails with conflicting prototypes for
the function.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Link: http://lkml.kernel.org/r/20150211162404.GA15522@hansolo.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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
-- 
1.9.3


  parent reply	other threads:[~2015-02-25 21:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 21:05 [GIT PULL 0/7] perf/urgent fixes Arnaldo Carvalho de Melo
2015-02-25 21:05 ` [PATCH 1/7] perf bench: Fix order of arguments to memcpy_alloc_mem Arnaldo Carvalho de Melo
2015-02-25 21:05 ` Arnaldo Carvalho de Melo [this message]
2015-02-25 21:05 ` [PATCH 3/7] perf tools: Fix pthread_attr_setaffinity_np build error Arnaldo Carvalho de Melo
2015-02-25 21:05 ` [PATCH 5/7] perf top: Fix SIGBUS on sparc64 Arnaldo Carvalho de Melo
2015-02-25 21:05 ` [PATCH 6/7] perf symbols: Define EM_AARCH64 for older OSes Arnaldo Carvalho de Melo
2015-02-25 21:05 ` [PATCH 7/7] perf tools: Make sparc64 arch point to sparc Arnaldo Carvalho de Melo

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=1424898340-26968-3-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=jwboyer@fedoraproject.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox