aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2009-08-09 15:02:51 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-19 20:29:28 -0400
commita15098c90df1ac2b1bfe1d33dd1c47063213aa9a (patch)
tree5553a81fe8bf1605f35ecf11170bed4770a8058b /arch
parent728656506447b3b349d082a7fb99445f9cb0caaa (diff)
powerpc: Enable GCOV
Make it possible to enable GCOV code coverage measurement on powerpc. Lightly tested on 64-bit, seems to work as expected. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/Makefile7
-rw-r--r--arch/powerpc/kernel/vdso32/Makefile1
-rw-r--r--arch/powerpc/kernel/vdso64/Makefile2
-rw-r--r--arch/powerpc/xmon/Makefile2
4 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 035946f9d5fb..720e8c3b8e94 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -115,6 +115,13 @@ ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC),)
115obj-y += ppc_save_regs.o 115obj-y += ppc_save_regs.o
116endif 116endif
117 117
118# Disable GCOV in odd or sensitive code
119GCOV_PROFILE_prom_init.o := n
120GCOV_PROFILE_ftrace.o := n
121GCOV_PROFILE_machine_kexec_64.o := n
122GCOV_PROFILE_machine_kexec_32.o := n
123GCOV_PROFILE_kprobes.o := n
124
118extra-$(CONFIG_PPC_FPU) += fpu.o 125extra-$(CONFIG_PPC_FPU) += fpu.o
119extra-$(CONFIG_ALTIVEC) += vector.o 126extra-$(CONFIG_ALTIVEC) += vector.o
120extra-$(CONFIG_PPC64) += entry_64.o 127extra-$(CONFIG_PPC64) += entry_64.o
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
index c3d57bd01a88..b54b81688132 100644
--- a/arch/powerpc/kernel/vdso32/Makefile
+++ b/arch/powerpc/kernel/vdso32/Makefile
@@ -12,6 +12,7 @@ endif
12targets := $(obj-vdso32) vdso32.so vdso32.so.dbg 12targets := $(obj-vdso32) vdso32.so vdso32.so.dbg
13obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) 13obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
14 14
15GCOV_PROFILE := n
15 16
16EXTRA_CFLAGS := -shared -fno-common -fno-builtin 17EXTRA_CFLAGS := -shared -fno-common -fno-builtin
17EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 18EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile
index fa7f1b8f3e50..dd0c8e936775 100644
--- a/arch/powerpc/kernel/vdso64/Makefile
+++ b/arch/powerpc/kernel/vdso64/Makefile
@@ -7,6 +7,8 @@ obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o
7targets := $(obj-vdso64) vdso64.so vdso64.so.dbg 7targets := $(obj-vdso64) vdso64.so vdso64.so.dbg
8obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) 8obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
9 9
10GCOV_PROFILE := n
11
10EXTRA_CFLAGS := -shared -fno-common -fno-builtin 12EXTRA_CFLAGS := -shared -fno-common -fno-builtin
11EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 13EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
12 $(call ld-option, -Wl$(comma)--hash-style=sysv) 14 $(call ld-option, -Wl$(comma)--hash-style=sysv)
diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile
index 85ab97ab840a..faa81b6a6612 100644
--- a/arch/powerpc/xmon/Makefile
+++ b/arch/powerpc/xmon/Makefile
@@ -2,6 +2,8 @@
2 2
3subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror 3subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
4 4
5GCOV_PROFILE := n
6
5ifdef CONFIG_PPC64 7ifdef CONFIG_PPC64
6EXTRA_CFLAGS += -mno-minimal-toc 8EXTRA_CFLAGS += -mno-minimal-toc
7endif 9endif