nds32: Fix gcc 8.0 compiler option incompatible.
authorNickhu <nickhu@andestech.com>
Thu, 18 Oct 2018 08:37:55 +0000 (16:37 +0800)
committerGreentime Hu <greentime@andestech.com>
Tue, 6 Nov 2018 10:01:39 +0000 (18:01 +0800)
When the kernel configs of ftrace and frame pointer options are
choosed, the compiler option of kernel will incompatible.
Error message:
nds32le-linux-gcc: error: -pg and -fomit-frame-pointer are incompatible

Signed-off-by: Nickhu <nickhu@andestech.com>
Signed-off-by: Zong Li <zong@andestech.com>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
arch/nds32/mm/Makefile

index 6b685585222385a8a5232668143e027ea41ff368..7c5c15ad854aa534389f377aecd55a21f0f65079 100644 (file)
@@ -4,4 +4,8 @@ obj-y                           := extable.o tlb.o \
 
 obj-$(CONFIG_ALIGNMENT_TRAP)   += alignment.o
 obj-$(CONFIG_HIGHMEM)           += highmem.o
-CFLAGS_proc-n13.o              += -fomit-frame-pointer
+
+ifdef CONFIG_FUNCTION_TRACER
+CFLAGS_REMOVE_proc.o     = $(CC_FLAGS_FTRACE)
+endif
+CFLAGS_proc.o              += -fomit-frame-pointer