* [PATCH v3] MIPS: Makefile: Replace -pg with CC_FLAGS_FTRACE
@ 2021-04-20 7:00 zhaoxiao
2021-04-21 12:01 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: zhaoxiao @ 2021-04-20 7:00 UTC (permalink / raw)
To: tsbogend, jiaxun.yang, chenhuacai, viro, morbo
Cc: paul, alobakin, suxingxing, tangyouling, yangtiezhu, ralf,
nathan, masahiroy, keescook, linux-mips, linux-kernel, zhaoxiao
This patch replaces the "open-coded" -pg compile flag with a CC_FLAGS_FTRACE
makefile variable which architectures can override if a different option
should be used for code generation.
Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
---
v3:Modify the description for the patch.
arch/mips/boot/compressed/Makefile | 2 +-
arch/mips/kernel/Makefile | 8 ++++----
arch/mips/vdso/Makefile | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index f93f72bcba97..e4b7839293e1 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -18,7 +18,7 @@ include $(srctree)/arch/mips/Kbuild.platforms
BOOT_HEAP_SIZE := 0x400000
# Disable Function Tracer
-KBUILD_CFLAGS := $(filter-out -pg, $(KBUILD_CFLAGS))
+KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_FTRACE), $(KBUILD_CFLAGS))
KBUILD_CFLAGS := $(filter-out -fstack-protector, $(KBUILD_CFLAGS))
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index b4a57f1de772..814b3da30501 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -17,10 +17,10 @@ obj-y += cpu-probe.o
endif
ifdef CONFIG_FUNCTION_TRACER
-CFLAGS_REMOVE_ftrace.o = -pg
-CFLAGS_REMOVE_early_printk.o = -pg
-CFLAGS_REMOVE_perf_event.o = -pg
-CFLAGS_REMOVE_perf_event_mipsxx.o = -pg
+CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_early_printk.o = $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_perf_event.o = $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_perf_event_mipsxx.o = $(CC_FLAGS_FTRACE)
endif
obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm1480.o
diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
index 2131d3fd7333..1b2ea34c3d3b 100644
--- a/arch/mips/vdso/Makefile
+++ b/arch/mips/vdso/Makefile
@@ -46,7 +46,7 @@ CFLAGS_vgettimeofday-o32.o = -include $(srctree)/$(src)/config-n32-o32-env.c -in
CFLAGS_vgettimeofday-n32.o = -include $(srctree)/$(src)/config-n32-o32-env.c -include $(c-gettimeofday-y)
endif
-CFLAGS_REMOVE_vgettimeofday.o = -pg
+CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE)
ifdef CONFIG_MIPS_DISABLE_VDSO
ifndef CONFIG_MIPS_LD_CAN_LINK_VDSO
@@ -60,7 +60,7 @@ ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
$(filter -E%,$(KBUILD_CFLAGS)) -nostdlib -shared \
-G 0 --eh-frame-hdr --hash-style=sysv --build-id=sha1 -T
-CFLAGS_REMOVE_vdso.o = -pg
+CFLAGS_REMOVE_vdso.o = $(CC_FLAGS_FTRACE)
GCOV_PROFILE := n
UBSAN_SANITIZE := n
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] MIPS: Makefile: Replace -pg with CC_FLAGS_FTRACE
2021-04-20 7:00 [PATCH v3] MIPS: Makefile: Replace -pg with CC_FLAGS_FTRACE zhaoxiao
@ 2021-04-21 12:01 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-04-21 12:01 UTC (permalink / raw)
To: zhaoxiao
Cc: jiaxun.yang, chenhuacai, viro, morbo, paul, alobakin, suxingxing,
tangyouling, yangtiezhu, ralf, nathan, masahiroy, keescook,
linux-mips, linux-kernel
On Tue, Apr 20, 2021 at 03:00:52PM +0800, zhaoxiao wrote:
> This patch replaces the "open-coded" -pg compile flag with a CC_FLAGS_FTRACE
> makefile variable which architectures can override if a different option
> should be used for code generation.
>
> Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
> ---
> v3:Modify the description for the patch.
> arch/mips/boot/compressed/Makefile | 2 +-
> arch/mips/kernel/Makefile | 8 ++++----
> arch/mips/vdso/Makefile | 4 ++--
> 3 files changed, 7 insertions(+), 7 deletions(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-21 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 7:00 [PATCH v3] MIPS: Makefile: Replace -pg with CC_FLAGS_FTRACE zhaoxiao
2021-04-21 12:01 ` Thomas Bogendoerfer
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).