Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: GPL-2.0+ |
| 5 | # |
| 6 | |
Alexey Brodkin | cbd76c3 | 2015-02-03 13:58:14 +0300 | [diff] [blame] | 7 | ifndef CONFIG_CPU_BIG_ENDIAN |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 8 | CONFIG_SYS_LITTLE_ENDIAN = 1 |
Alexey Brodkin | cbd76c3 | 2015-02-03 13:58:14 +0300 | [diff] [blame] | 9 | else |
| 10 | CONFIG_SYS_BIG_ENDIAN = 1 |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 11 | endif |
| 12 | |
| 13 | ifdef CONFIG_SYS_LITTLE_ENDIAN |
Masahiro Yamada | 4ec537a | 2015-05-13 18:49:31 +0900 | [diff] [blame] | 14 | ARC_CROSS_COMPILE := arc-linux- |
Alexey Brodkin | 93206d2 | 2015-02-03 13:58:20 +0300 | [diff] [blame] | 15 | PLATFORM_LDFLAGS += -EL |
| 16 | PLATFORM_CPPFLAGS += -mlittle-endian |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 17 | endif |
| 18 | |
| 19 | ifdef CONFIG_SYS_BIG_ENDIAN |
Masahiro Yamada | 4ec537a | 2015-05-13 18:49:31 +0900 | [diff] [blame] | 20 | ARC_CROSS_COMPILE := arceb-linux- |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 21 | PLATFORM_LDFLAGS += -EB |
Alexey Brodkin | 93206d2 | 2015-02-03 13:58:20 +0300 | [diff] [blame] | 22 | PLATFORM_CPPFLAGS += -mbig-endian |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 23 | endif |
| 24 | |
Masahiro Yamada | f0ac9e0 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 25 | ifeq ($(CROSS_COMPILE),) |
| 26 | CROSS_COMPILE := $(ARC_CROSS_COMPILE) |
| 27 | endif |
| 28 | |
Alexey Brodkin | 5e4931f | 2014-12-24 17:00:29 +0300 | [diff] [blame] | 29 | ifdef CONFIG_ARC_MMU_VER |
| 30 | CONFIG_MMU = 1 |
| 31 | endif |
| 32 | |
Alexey Brodkin | 2f02080 | 2015-02-03 13:58:19 +0300 | [diff] [blame] | 33 | ifdef CONFIG_CPU_ARC750D |
| 34 | PLATFORM_CPPFLAGS += -marc700 |
| 35 | endif |
| 36 | |
Alexey Brodkin | f431e26 | 2015-02-03 13:58:11 +0300 | [diff] [blame] | 37 | ifdef CONFIG_CPU_ARC770D |
Alexey Brodkin | 2f02080 | 2015-02-03 13:58:19 +0300 | [diff] [blame] | 38 | PLATFORM_CPPFLAGS += -marc700 -mlock -mswape |
Alexey Brodkin | f431e26 | 2015-02-03 13:58:11 +0300 | [diff] [blame] | 39 | endif |
| 40 | |
Alexey Brodkin | e41a3d5 | 2015-01-13 18:35:46 +0300 | [diff] [blame] | 41 | ifdef CONFIG_CPU_ARCEM6 |
| 42 | PLATFORM_CPPFLAGS += -marcem |
| 43 | endif |
| 44 | |
| 45 | ifdef CONFIG_CPU_ARCHS34 |
Alexey Brodkin | 2e54197 | 2016-06-16 10:55:00 +0200 | [diff] [blame] | 46 | PLATFORM_CPPFLAGS += -mcpu=archs |
Alexey Brodkin | e41a3d5 | 2015-01-13 18:35:46 +0300 | [diff] [blame] | 47 | endif |
| 48 | |
| 49 | ifdef CONFIG_CPU_ARCHS38 |
Alexey Brodkin | 2e54197 | 2016-06-16 10:55:00 +0200 | [diff] [blame] | 50 | PLATFORM_CPPFLAGS += -mcpu=archs |
Alexey Brodkin | e41a3d5 | 2015-01-13 18:35:46 +0300 | [diff] [blame] | 51 | endif |
| 52 | |
Masahiro Yamada | 4869aee | 2014-07-30 14:08:23 +0900 | [diff] [blame] | 53 | PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 54 | |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 55 | # Needed for relocation |
| 56 | LDFLAGS_FINAL += -pie |
| 57 | |
| 58 | # Load address for standalone apps |
| 59 | CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000 |