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 | a67ef28 | 2015-02-03 13:58:20 +0300 | [diff] [blame] | 15 | PLATFORM_LDFLAGS += -EL |
| 16 | PLATFORM_CPPFLAGS += -mlittle-endian |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 17 | endif |
| 18 | |
| 19 | ifdef CONFIG_SYS_BIG_ENDIAN |
Masahiro Yamada | 9b6e2c3 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 20 | ARC_CROSS_COMPILE := arceb-buildroot-linux-uclibc- |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 21 | PLATFORM_LDFLAGS += -EB |
Alexey Brodkin | a67ef28 | 2015-02-03 13:58:20 +0300 | [diff] [blame] | 22 | PLATFORM_CPPFLAGS += -mbig-endian |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 23 | endif |
| 24 | |
Masahiro Yamada | 9b6e2c3 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 25 | ifeq ($(CROSS_COMPILE),) |
| 26 | CROSS_COMPILE := $(ARC_CROSS_COMPILE) |
| 27 | endif |
| 28 | |
Alexey Brodkin | dcb431e | 2014-12-24 17:00:29 +0300 | [diff] [blame] | 29 | ifdef CONFIG_ARC_MMU_VER |
| 30 | CONFIG_MMU = 1 |
| 31 | endif |
| 32 | |
Alexey Brodkin | 51f4999 | 2015-02-03 13:58:19 +0300 | [diff] [blame] | 33 | ifdef CONFIG_CPU_ARC750D |
| 34 | PLATFORM_CPPFLAGS += -marc700 |
| 35 | endif |
| 36 | |
Alexey Brodkin | 812980b | 2015-02-03 13:58:11 +0300 | [diff] [blame] | 37 | ifdef CONFIG_CPU_ARC770D |
Alexey Brodkin | 51f4999 | 2015-02-03 13:58:19 +0300 | [diff] [blame] | 38 | PLATFORM_CPPFLAGS += -marc700 -mlock -mswape |
Alexey Brodkin | 812980b | 2015-02-03 13:58:11 +0300 | [diff] [blame] | 39 | endif |
| 40 | |
Alexey Brodkin | f13606b | 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 |
| 46 | PLATFORM_CPPFLAGS += -marchs |
| 47 | endif |
| 48 | |
| 49 | ifdef CONFIG_CPU_ARCHS38 |
| 50 | PLATFORM_CPPFLAGS += -marchs |
| 51 | endif |
| 52 | |
Masahiro Yamada | 90f984e | 2014-07-30 14:08:23 +0900 | [diff] [blame] | 53 | PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 54 | |
Alexey Brodkin | 2f16ac9 | 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 |
| 60 | |
| 61 | # Support generic board on ARC |
| 62 | __HAVE_ARCH_GENERIC_BOARD := y |