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 | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 15 | endif |
| 16 | |
| 17 | ifdef CONFIG_SYS_BIG_ENDIAN |
Masahiro Yamada | f0ac9e0 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 18 | ARC_CROSS_COMPILE := arceb-buildroot-linux-uclibc- |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 19 | PLATFORM_LDFLAGS += -EB |
| 20 | endif |
| 21 | |
Masahiro Yamada | f0ac9e0 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 22 | ifeq ($(CROSS_COMPILE),) |
| 23 | CROSS_COMPILE := $(ARC_CROSS_COMPILE) |
| 24 | endif |
| 25 | |
Alexey Brodkin | 5e4931f | 2014-12-24 17:00:29 +0300 | [diff] [blame] | 26 | ifdef CONFIG_ARC_MMU_VER |
| 27 | CONFIG_MMU = 1 |
| 28 | endif |
| 29 | |
Alexey Brodkin | f431e26 | 2015-02-03 13:58:11 +0300 | [diff] [blame] | 30 | ifdef CONFIG_CPU_ARC770D |
| 31 | PLATFORM_CPPFLAGS += -mlock -mswape |
| 32 | endif |
| 33 | |
Masahiro Yamada | 4869aee | 2014-07-30 14:08:23 +0900 | [diff] [blame] | 34 | PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 35 | |
Alexey Brodkin | 3a59d91 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 36 | # Needed for relocation |
| 37 | LDFLAGS_FINAL += -pie |
| 38 | |
| 39 | # Load address for standalone apps |
| 40 | CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000 |
| 41 | |
| 42 | # Support generic board on ARC |
| 43 | __HAVE_ARCH_GENERIC_BOARD := y |