1 # SPDX-License-Identifier: GPL-2.0+
3 # Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
5 ifndef CONFIG_CPU_BIG_ENDIAN
6 CONFIG_SYS_LITTLE_ENDIAN = 1
8 CONFIG_SYS_BIG_ENDIAN = 1
11 ifdef CONFIG_SYS_LITTLE_ENDIAN
12 ARC_CROSS_COMPILE := arc-linux-
13 PLATFORM_LDFLAGS += -EL
14 PLATFORM_CPPFLAGS += -mlittle-endian
17 ifdef CONFIG_SYS_BIG_ENDIAN
18 ARC_CROSS_COMPILE := arceb-linux-
19 PLATFORM_LDFLAGS += -EB
20 PLATFORM_CPPFLAGS += -mbig-endian
23 ifeq ($(CROSS_COMPILE),)
24 CROSS_COMPILE := $(ARC_CROSS_COMPILE)
27 ifdef CONFIG_ARC_MMU_VER
31 ifdef CONFIG_CPU_ARC750D
32 PLATFORM_CPPFLAGS += -mcpu=arc700
35 ifdef CONFIG_CPU_ARC770D
36 PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape
39 ifdef CONFIG_CPU_ARCEM6
40 PLATFORM_CPPFLAGS += -mcpu=arcem
43 ifdef CONFIG_CPU_ARCHS34
44 PLATFORM_CPPFLAGS += -mcpu=archs
47 ifdef CONFIG_CPU_ARCHS38
48 PLATFORM_CPPFLAGS += -mcpu=archs
51 PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata
52 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
54 # Needed for relocation
55 LDFLAGS_FINAL += -pie --gc-sections
57 # Load address for standalone apps
58 CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000