]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | # SPDX-License-Identifier: GPL-2.0+ |
2f16ac9d AB |
2 | # |
3 | # Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. | |
2f16ac9d | 4 | |
1f9ad445 | 5 | ifndef CONFIG_CPU_BIG_ENDIAN |
2f16ac9d | 6 | CONFIG_SYS_LITTLE_ENDIAN = 1 |
1f9ad445 AB |
7 | else |
8 | CONFIG_SYS_BIG_ENDIAN = 1 | |
2f16ac9d AB |
9 | endif |
10 | ||
11 | ifdef CONFIG_SYS_LITTLE_ENDIAN | |
574bbf4f | 12 | ARC_CROSS_COMPILE := arc-linux- |
a67ef280 AB |
13 | PLATFORM_LDFLAGS += -EL |
14 | PLATFORM_CPPFLAGS += -mlittle-endian | |
2f16ac9d AB |
15 | endif |
16 | ||
17 | ifdef CONFIG_SYS_BIG_ENDIAN | |
574bbf4f | 18 | ARC_CROSS_COMPILE := arceb-linux- |
2f16ac9d | 19 | PLATFORM_LDFLAGS += -EB |
a67ef280 | 20 | PLATFORM_CPPFLAGS += -mbig-endian |
2f16ac9d AB |
21 | endif |
22 | ||
9b6e2c36 MY |
23 | ifeq ($(CROSS_COMPILE),) |
24 | CROSS_COMPILE := $(ARC_CROSS_COMPILE) | |
25 | endif | |
26 | ||
dcb431e7 AB |
27 | ifdef CONFIG_ARC_MMU_VER |
28 | CONFIG_MMU = 1 | |
29 | endif | |
30 | ||
51f4999b | 31 | ifdef CONFIG_CPU_ARC750D |
7c8d8160 | 32 | PLATFORM_CPPFLAGS += -mcpu=arc700 |
51f4999b AB |
33 | endif |
34 | ||
812980bd | 35 | ifdef CONFIG_CPU_ARC770D |
7c8d8160 | 36 | PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape |
812980bd AB |
37 | endif |
38 | ||
f13606b7 | 39 | ifdef CONFIG_CPU_ARCEM6 |
7c8d8160 | 40 | PLATFORM_CPPFLAGS += -mcpu=arcem |
f13606b7 AB |
41 | endif |
42 | ||
43 | ifdef CONFIG_CPU_ARCHS34 | |
7a54f517 | 44 | PLATFORM_CPPFLAGS += -mcpu=archs |
f13606b7 AB |
45 | endif |
46 | ||
47 | ifdef CONFIG_CPU_ARCHS38 | |
7a54f517 | 48 | PLATFORM_CPPFLAGS += -mcpu=archs |
f13606b7 AB |
49 | endif |
50 | ||
d53b128d | 51 | PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata |
fac47904 | 52 | PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections |
2f16ac9d | 53 | |
2f16ac9d | 54 | # Needed for relocation |
fac47904 | 55 | LDFLAGS_FINAL += -pie --gc-sections |
2f16ac9d AB |
56 | |
57 | # Load address for standalone apps | |
58 | CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000 |