aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorIan Munsie <imunsie@au1.ibm.com>2010-11-28 19:53:07 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-12-07 08:58:50 -0500
commitb38aa89600be39b3e10c5b6529aed2e66518598e (patch)
tree2be9cfdfc7cc5692cdc53ea8ff2c02c8da29768c /tools/perf/Makefile
parent75b5293a5d176cd9caf6dc590da4f3458c048c3c (diff)
perf makefile: Allow strong and weak functions in LIB_OBJS
When we build perf we place all of the .o files from the library files (util, arch/x/util, etc) into libperf.a which is then linked into perf. The problem is that the linker will by default only consider .o files within the .a archive if they are necessary to satisfy an unresolved symbol. As weak functions are not unresolved, it will not consider a .o file from the archive containing the strong versions of weak functions unless it requires it for another reason. This patch adds the --whole-archive flags to the linker when passing in the libperf.a file to ensure that it will consider every .o file in the archive, not just what it believes that it needs. The end result is that weak functions can now be overridden by strong variants of them in the libperf.a file. Cc: "tom.leiming" <tom.leiming@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1290991642-sup-5890@au1.ibm.com> Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index d88137a4356e..ac6692cf5508 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -901,7 +901,7 @@ prefix_SQ = $(subst ','\'',$(prefix))
901SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) 901SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
902PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) 902PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
903 903
904LIBS = $(PERFLIBS) $(EXTLIBS) 904LIBS = -Wl,--whole-archive $(PERFLIBS) -Wl,--no-whole-archive $(EXTLIBS)
905 905
906BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \ 906BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \
907 $(COMPAT_CFLAGS) 907 $(COMPAT_CFLAGS)