Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 2 | # |
3 | # Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. | ||||
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 4 | |
Alexey Brodkin | 1f9ad44 | 2015-02-03 13:58:14 +0300 | [diff] [blame] | 5 | ifndef CONFIG_CPU_BIG_ENDIAN |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 6 | CONFIG_SYS_LITTLE_ENDIAN = 1 |
Alexey Brodkin | 1f9ad44 | 2015-02-03 13:58:14 +0300 | [diff] [blame] | 7 | else |
8 | CONFIG_SYS_BIG_ENDIAN = 1 | ||||
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 9 | endif |
10 | |||||
11 | ifdef CONFIG_SYS_LITTLE_ENDIAN | ||||
Alexey Brodkin | a67ef28 | 2015-02-03 13:58:20 +0300 | [diff] [blame] | 12 | PLATFORM_LDFLAGS += -EL |
13 | PLATFORM_CPPFLAGS += -mlittle-endian | ||||
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 14 | endif |
15 | |||||
16 | ifdef CONFIG_SYS_BIG_ENDIAN | ||||
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 17 | PLATFORM_LDFLAGS += -EB |
Alexey Brodkin | a67ef28 | 2015-02-03 13:58:20 +0300 | [diff] [blame] | 18 | PLATFORM_CPPFLAGS += -mbig-endian |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 19 | endif |
20 | |||||
Alexey Brodkin | dcb431e | 2014-12-24 17:00:29 +0300 | [diff] [blame] | 21 | ifdef CONFIG_ARC_MMU_VER |
22 | CONFIG_MMU = 1 | ||||
23 | endif | ||||
24 | |||||
Alexey Brodkin | 51f4999 | 2015-02-03 13:58:19 +0300 | [diff] [blame] | 25 | ifdef CONFIG_CPU_ARC750D |
Alexey Brodkin | 7c8d816 | 2016-09-16 12:12:26 +0300 | [diff] [blame] | 26 | PLATFORM_CPPFLAGS += -mcpu=arc700 |
Alexey Brodkin | 51f4999 | 2015-02-03 13:58:19 +0300 | [diff] [blame] | 27 | endif |
28 | |||||
Alexey Brodkin | 812980b | 2015-02-03 13:58:11 +0300 | [diff] [blame] | 29 | ifdef CONFIG_CPU_ARC770D |
Alexey Brodkin | 7c8d816 | 2016-09-16 12:12:26 +0300 | [diff] [blame] | 30 | PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape |
Alexey Brodkin | 812980b | 2015-02-03 13:58:11 +0300 | [diff] [blame] | 31 | endif |
32 | |||||
Alexey Brodkin | f13606b | 2015-01-13 18:35:46 +0300 | [diff] [blame] | 33 | ifdef CONFIG_CPU_ARCEM6 |
Alexey Brodkin | 7c8d816 | 2016-09-16 12:12:26 +0300 | [diff] [blame] | 34 | PLATFORM_CPPFLAGS += -mcpu=arcem |
Alexey Brodkin | f13606b | 2015-01-13 18:35:46 +0300 | [diff] [blame] | 35 | endif |
36 | |||||
37 | ifdef CONFIG_CPU_ARCHS34 | ||||
Alexey Brodkin | 7a54f51 | 2016-06-16 10:55:00 +0200 | [diff] [blame] | 38 | PLATFORM_CPPFLAGS += -mcpu=archs |
Alexey Brodkin | f13606b | 2015-01-13 18:35:46 +0300 | [diff] [blame] | 39 | endif |
40 | |||||
41 | ifdef CONFIG_CPU_ARCHS38 | ||||
Alexey Brodkin | 7a54f51 | 2016-06-16 10:55:00 +0200 | [diff] [blame] | 42 | PLATFORM_CPPFLAGS += -mcpu=archs |
Alexey Brodkin | f13606b | 2015-01-13 18:35:46 +0300 | [diff] [blame] | 43 | endif |
44 | |||||
Alexey Brodkin | d53b128 | 2018-02-15 15:34:58 +0300 | [diff] [blame] | 45 | PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata |
Alexey Brodkin | 6e63314 | 2018-10-11 23:12:05 +0300 | [diff] [blame] | 46 | PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections -fno-common |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 47 | |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 48 | # Needed for relocation |
Alexey Brodkin | fac4790 | 2018-01-25 00:25:12 +0300 | [diff] [blame] | 49 | LDFLAGS_FINAL += -pie --gc-sections |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 50 | |
51 | # Load address for standalone apps | ||||
52 | CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000 |