Alexey Brodkin | 2f16ac9 | 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 | 1f9ad44 | 2015-02-03 13:58:14 +0300 | [diff] [blame^] | 7 | ifndef CONFIG_CPU_BIG_ENDIAN |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 8 | CONFIG_SYS_LITTLE_ENDIAN = 1 |
Alexey Brodkin | 1f9ad44 | 2015-02-03 13:58:14 +0300 | [diff] [blame^] | 9 | else |
| 10 | CONFIG_SYS_BIG_ENDIAN = 1 |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 11 | endif |
| 12 | |
| 13 | ifdef CONFIG_SYS_LITTLE_ENDIAN |
Masahiro Yamada | 9b6e2c3 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 14 | ARC_CROSS_COMPILE := arc-buildroot-linux-uclibc- |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 15 | endif |
| 16 | |
| 17 | ifdef CONFIG_SYS_BIG_ENDIAN |
Masahiro Yamada | 9b6e2c3 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 18 | ARC_CROSS_COMPILE := arceb-buildroot-linux-uclibc- |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 19 | PLATFORM_LDFLAGS += -EB |
| 20 | endif |
| 21 | |
Masahiro Yamada | 9b6e2c3 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 22 | ifeq ($(CROSS_COMPILE),) |
| 23 | CROSS_COMPILE := $(ARC_CROSS_COMPILE) |
| 24 | endif |
| 25 | |
Alexey Brodkin | dcb431e | 2014-12-24 17:00:29 +0300 | [diff] [blame] | 26 | ifdef CONFIG_ARC_MMU_VER |
| 27 | CONFIG_MMU = 1 |
| 28 | endif |
| 29 | |
Alexey Brodkin | 812980b | 2015-02-03 13:58:11 +0300 | [diff] [blame] | 30 | ifdef CONFIG_CPU_ARC770D |
| 31 | PLATFORM_CPPFLAGS += -mlock -mswape |
| 32 | endif |
| 33 | |
Masahiro Yamada | 90f984e | 2014-07-30 14:08:23 +0900 | [diff] [blame] | 34 | PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 35 | |
Alexey Brodkin | 2f16ac9 | 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 |