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 PLATFORM_LDFLAGS += -EL
13 PLATFORM_CPPFLAGS += -mlittle-endian
16 ifdef CONFIG_SYS_BIG_ENDIAN
17 PLATFORM_LDFLAGS += -EB
18 PLATFORM_CPPFLAGS += -mbig-endian
21 ifdef CONFIG_ARC_MMU_VER
25 ifdef CONFIG_CPU_ARC750D
26 PLATFORM_CPPFLAGS += -mcpu=arc700
29 ifdef CONFIG_CPU_ARC770D
30 PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape
33 ifdef CONFIG_CPU_ARCEM6
34 PLATFORM_CPPFLAGS += -mcpu=arcem
37 ifdef CONFIG_CPU_ARCHS34
38 PLATFORM_CPPFLAGS += -mcpu=archs
41 ifdef CONFIG_CPU_ARCHS38
42 PLATFORM_CPPFLAGS += -mcpu=archs
45 PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata
46 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections -fno-common
48 # Needed for relocation
49 LDFLAGS_FINAL += -pie --gc-sections
51 # Load address for standalone apps
52 CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000