Skip to contentSkip to conversation

nds32: Fix gcc 8.0 compiler option incompatible.

PATCH In review Nickhu 2 participants 3 messages Oct 18, 2018 – Oct 19, 2018

lore
Share & tools
lore

Nickhu

author
#0 lore raw

cover nds32: Fix gcc 8.0 compiler option incompatible.

Fix gcc 8.0 compiler option incompatible When the kernel configs of ftrace and frame pointer options are choosed.

Nickhu (1):
nds32: Fix gcc 8.0 compiler option incompatible.

 arch/nds32/mm/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
2.17.0
author
#1 lore raw

PATCH 1/1 nds32: Fix gcc 8.0 compiler option incompatible.

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

---
 arch/nds32/mm/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
arch/nds32/mm/Makefile +5 -1
index 6b6855852223..7c5c15ad854a 100644
@@ -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
Signature · 1 line
2.17.0
Acked-by on v1 1/1
#2 lore raw

Nickhu <[email protected]> 於 2018年10月18日 週四 下午4:38寫道:

Quoted 17 lines

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

---
 arch/nds32/mm/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
arch/nds32/mm/Makefile +0 -0
index 6b6855852223..7c5c15ad854a 100644

arch/nds32/mm/Makefile obj-y := extable.o tlb.o \ · line 11

Quoted 9 lines
arch/nds32/mm/Makefile +5 -1
@@ -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

Hi Nick,

Thanks.