From: Dongsu Park <dongsu.park@profitbricks.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: linux-kernel@vger.kernel.org, Dongsu Park <dongsu.park@profitbricks.com>
Subject: [PATCH] perf: define LIBLOCKDEP_LIBS to fix linker errors
Date: Thu, 21 Feb 2013 18:16:56 +0100 [thread overview]
Message-ID: <1361467016-4329-1-git-send-email-dongsu.park@profitbricks.com> (raw)
In-Reply-To: <1359942644-26371-7-git-send-email-sasha.levin@oracle.com>
EXTLIBS has to include -llockdep, so that perf can be linked against
liblockdep properly by gcc 4.6 or newer. That can be done by setting
LIBLOCKDEP_LIBS to "-llockdep", as it's already included in EXTLIBS.
Without this fix, building perf will fail with the following errors:
builtin-sched.o: In function `thread_func':
/linux/tools/perf/builtin-sched.c:471:
undefined reference to `liblockdep_set_thread'
builtin-sched.o: In function `liblockdep_pthread_mutex_lock':
/linux/tools/perf/../lib/lockdep/include/liblockdep/mutex.h:41:
undefined reference to `lock_acquire'
builtin-sched.o: In function `liblockdep_pthread_mutex_unlock':
/linux/tools/perf/../lib/lockdep/include/liblockdep/mutex.h:48:
undefined reference to `lock_release'
Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
---
tools/perf/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 785cd51..8d5c9eb 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -576,8 +576,9 @@ ifndef NO_LIBLOCKDEP
# for linking with liblockdep library, run like:
# make LIBLOCKDEP=1
ifeq ($(LOCKDEP),1)
+ LIBLOCKDEP_LIBS := -llockdep
LIBLOCKDEP_CFLAGS := -I../lib/lockdep/include -D__USE_LIBLOCKDEP
- LIBLOCKDEP_LDFLAGS := -L../lib/lockdep/ -llockdep
+ LIBLOCKDEP_LDFLAGS := -L../lib/lockdep/ $(LIBLOCKDEP_LIBS)
endif
FLAGS_LIBLOCKDEP=$(LIBLOCKDEP_CFLAGS) $(ALL_CFLAGS) $(LIBLOCKDEP_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS)
--
1.8.0.3
next prev parent reply other threads:[~2013-02-21 17:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 1:50 [PATCH v3 1/7] liblockdep: wrap kernel/lockdep.c to allow usage from userspace Sasha Levin
2013-02-04 1:50 ` [PATCH v3 2/7] liblockdep: public headers for mutex implementation Sasha Levin
2013-02-04 13:51 ` [tip:core/locking] liblockdep: Add public headers for pthread_mutex_t implementation tip-bot for Sasha Levin
2013-02-04 1:50 ` [PATCH v3 3/7] liblockdep: mutex test suite Sasha Levin
2013-02-04 13:52 ` [tip:core/locking] liblockdep: Add pthread_mutex_t " tip-bot for Sasha Levin
2013-02-04 1:50 ` [PATCH v3 4/7] liblockdep: public headers for rwlock implementation Sasha Levin
2013-02-04 13:53 ` [tip:core/locking] liblockdep: Add public headers for pthread_rwlock_t implementation tip-bot for Sasha Levin
2013-02-04 1:50 ` [PATCH v3 5/7] liblockdep: rwlock test suite Sasha Levin
2013-02-04 13:55 ` [tip:core/locking] liblockdep: Add pthread_rwlock_t " tip-bot for Sasha Levin
2013-02-04 1:50 ` [PATCH v3 6/7] liblockdep: add a MAINTAINERS entry Sasha Levin
2013-02-04 13:56 ` [tip:core/locking] liblockdep: Add " tip-bot for Sasha Levin
2013-02-04 1:50 ` [PATCH v3 7/7] perf: integrate liblockdep support into perf Sasha Levin
2013-02-04 13:57 ` [tip:core/locking] perf: Integrate " tip-bot for Sasha Levin
2013-02-21 17:16 ` Dongsu Park [this message]
2013-02-04 10:48 ` [PATCH v3 1/7] liblockdep: wrap kernel/lockdep.c to allow usage from userspace Ingo Molnar
2013-02-04 13:48 ` [tip:core/locking] liblockdep: Wrap kernel/ lockdep.c " tip-bot for Sasha Levin
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=1361467016-4329-1-git-send-email-dongsu.park@profitbricks.com \
--to=dongsu.park@profitbricks.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sasha.levin@oracle.com \
/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
all inboxes | Powered by JetHome®