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 | f0ac9e0 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 14 | ARC_CROSS_COMPILE := arc-buildroot-linux-uclibc- |
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 | f0ac9e0 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 20 | ARC_CROSS_COMPILE := arceb-buildroot-linux-uclibc- |
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 | |
Masahiro Yamada | 4869aee | 2014-07-30 14:08:23 +0900 | [diff] [blame] | 41 | PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 42 | |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 43 | # Needed for relocation |
| 44 | LDFLAGS_FINAL += -pie |
| 45 | |
| 46 | # Load address for standalone apps |
| 47 | CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000 |
| 48 | |
| 49 | # Support generic board on ARC |
| 50 | __HAVE_ARCH_GENERIC_BOARD := y |