lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 21 Feb 2013 18:16:56 +0100
From:	Dongsu Park <dongsu.park@...fitbricks.com>
To:	Sasha Levin <sasha.levin@...cle.com>
Cc:	linux-kernel@...r.kernel.org,
	Dongsu Park <dongsu.park@...fitbricks.com>
Subject: [PATCH] perf: define LIBLOCKDEP_LIBS to fix linker errors

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@...fitbricks.com>
Cc: Sasha Levin <sasha.levin@...cle.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ