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