linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] perf build questions
@ 2009-10-05 20:17 Randy Dunlap
  2009-10-05 20:47 ` Frederic Weisbecker
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Randy Dunlap @ 2009-10-05 20:17 UTC (permalink / raw)
  To: lkml; +Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar

Hi,

How do I build 'perf' for an i386 target when running on x86_64?
and how do I do 'perf' cross-builds in general?


Also, I see build errors/warnings (-Werror).  Others aren't seeing these?
Just due to my gcc version?

Patch below.

Thanks.
---

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix perf build warnings/errors in function argument types:

builtin-sched.c:1894: warning: passing argument 1 of 'sort_dimension__add' discards qualifiers from pointer target type
util/trace-event-parse.c:685: warning: passing argument 2 of 'read_expected' discards qualifiers from pointer target type
util/trace-event-parse.c:741: warning: passing argument 4 of 'test_type_token' discards qualifiers from pointer target type
util/trace-event-parse.c:706: warning: passing argument 2 of 'read_expected_item' discards qualifiers from pointer target type

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 tools/perf/builtin-sched.c          |    2 +-
 tools/perf/util/trace-event-parse.c |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1287,7 +1287,7 @@ static struct sort_dimension *available_
 
 static LIST_HEAD(sort_list);
 
-static int sort_dimension__add(char *tok, struct list_head *list)
+static int sort_dimension__add(const char *tok, struct list_head *list)
 {
 	int i;
 
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -618,7 +618,7 @@ static int test_type(enum event_type typ
 }
 
 static int test_type_token(enum event_type type, char *token,
-		    enum event_type expect, char *expect_tok)
+		    enum event_type expect, const char *expect_tok)
 {
 	if (type != expect) {
 		die("Error: expected type %d but read %d",
@@ -650,7 +650,7 @@ static int read_expect_type(enum event_t
 	return __read_expect_type(expect, tok, 1);
 }
 
-static int __read_expected(enum event_type expect, char *str, int newline_ok)
+static int __read_expected(enum event_type expect, const char *str, int newline_ok)
 {
 	enum event_type type;
 	char *token;
@@ -668,12 +668,12 @@ static int __read_expected(enum event_ty
 	return 0;
 }
 
-static int read_expected(enum event_type expect, char *str)
+static int read_expected(enum event_type expect, const char *str)
 {
 	return __read_expected(expect, str, 1);
 }
 
-static int read_expected_item(enum event_type expect, char *str)
+static int read_expected_item(enum event_type expect, const char *str)
 {
 	return __read_expected(expect, str, 0);
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-10-12 15:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-05 20:17 [patch] perf build questions Randy Dunlap
2009-10-05 20:47 ` Frederic Weisbecker
2009-10-06  8:48 ` Peter Zijlstra
2009-10-06 17:26   ` Randy Dunlap
2009-10-06 18:02     ` Peter Zijlstra
2009-10-06 18:05     ` Kyle McMartin
2009-10-06 18:09       ` Randy Dunlap
2009-10-12  8:47         ` Ingo Molnar
2009-10-12 15:34           ` Randy Dunlap
2009-10-12  6:35 ` Ingo Molnar
2009-10-12 15:33   ` Randy Dunlap
2009-10-12  6:52 ` [tip:perf/urgent] perf tools: Fix const char type propagation tip-bot for Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).