]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nds32: fix building failed if using older version gcc.
authorGreentime Hu <greentime@andestech.com>
Thu, 1 Mar 2018 02:54:07 +0000 (10:54 +0800)
committerGreentime Hu <greentime@andestech.com>
Fri, 16 Mar 2018 07:45:20 +0000 (15:45 +0800)
It will be built failed because these options are not supported by older
version gcc.

Signed-off-by: Greentime Hu <greentime@andestech.com>
arch/nds32/Makefile

index 54b4de9d48b6c477e506e9ee02f506f165743daf..91f933d5a962aee31c3e4fcad3a7bd9396806785 100644 (file)
@@ -5,7 +5,8 @@ KBUILD_DEFCONFIG := defconfig
 
 comma = ,
 
-KBUILD_CFLAGS  +=-mno-sched-prolog-epilog -mcmodel=large
+KBUILD_CFLAGS  += $(call cc-option, -mno-sched-prolog-epilog)
+KBUILD_CFLAGS  += -mcmodel=large
 
 KBUILD_CFLAGS  +=$(arch-y) $(tune-y)
 KBUILD_AFLAGS  +=$(arch-y) $(tune-y)
@@ -33,9 +34,9 @@ BUILTIN_DTB := n
 endif
 
 ifdef CONFIG_CPU_LITTLE_ENDIAN
-KBUILD_CFLAGS   += -EL
+KBUILD_CFLAGS   += $(call cc-option, -EL)
 else
-KBUILD_CFLAGS   += -EB
+KBUILD_CFLAGS   += $(call cc-option, -EB)
 endif
 
 boot := arch/nds32/boot