|
@@ -6,33 +6,11 @@
|
|
|
# published by the Free Software Foundation.
|
|
|
#
|
|
|
|
|
|
-ifeq ($(CROSS_COMPILE),)
|
|
|
-ifndef CONFIG_CPU_BIG_ENDIAN
|
|
|
-CROSS_COMPILE := arc-linux-
|
|
|
-else
|
|
|
-CROSS_COMPILE := arceb-linux-
|
|
|
-endif
|
|
|
-endif
|
|
|
-
|
|
|
KBUILD_DEFCONFIG := nsim_700_defconfig
|
|
|
|
|
|
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
|
|
|
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
|
|
|
-cflags-$(CONFIG_ISA_ARCV2) += -mcpu=archs
|
|
|
-
|
|
|
-is_700 = $(shell $(CC) -dM -E - < /dev/null | grep -q "ARC700" && echo 1 || echo 0)
|
|
|
-
|
|
|
-ifdef CONFIG_ISA_ARCOMPACT
|
|
|
-ifeq ($(is_700), 0)
|
|
|
- $(error Toolchain not configured for ARCompact builds)
|
|
|
-endif
|
|
|
-endif
|
|
|
-
|
|
|
-ifdef CONFIG_ISA_ARCV2
|
|
|
-ifeq ($(is_700), 1)
|
|
|
- $(error Toolchain not configured for ARCv2 builds)
|
|
|
-endif
|
|
|
-endif
|
|
|
+cflags-$(CONFIG_ISA_ARCV2) += -mcpu=hs38
|
|
|
|
|
|
ifdef CONFIG_ARC_CURR_IN_REG
|
|
|
# For a global register defintion, make sure it gets passed to every file
|
|
@@ -79,7 +57,7 @@ cflags-$(disable_small_data) += -mno-sdata -fcall-used-gp
|
|
|
cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mbig-endian
|
|
|
ldflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB
|
|
|
|
|
|
-LIBGCC := $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
|
|
|
+LIBGCC = $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
|
|
|
|
|
|
# Modules with short calls might break for calls into builtin-kernel
|
|
|
KBUILD_CFLAGS_MODULE += -mlong-calls -mno-millicode
|