blob: f1e81b689502e94126c74d78c6c6bfa670e5478b [file] [log] [blame]
Alexey Brodkin3a59d912014-02-04 12:56:14 +04001#
2# Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
3#
4# SPDX-License-Identifier: GPL-2.0+
5#
6
Alexey Brodkincbd76c32015-02-03 13:58:14 +03007ifndef CONFIG_CPU_BIG_ENDIAN
Alexey Brodkin3a59d912014-02-04 12:56:14 +04008CONFIG_SYS_LITTLE_ENDIAN = 1
Alexey Brodkincbd76c32015-02-03 13:58:14 +03009else
10CONFIG_SYS_BIG_ENDIAN = 1
Alexey Brodkin3a59d912014-02-04 12:56:14 +040011endif
12
13ifdef CONFIG_SYS_LITTLE_ENDIAN
Masahiro Yamadaf0ac9e02014-02-28 14:33:30 +090014ARC_CROSS_COMPILE := arc-buildroot-linux-uclibc-
Alexey Brodkin93206d22015-02-03 13:58:20 +030015PLATFORM_LDFLAGS += -EL
16PLATFORM_CPPFLAGS += -mlittle-endian
Alexey Brodkin3a59d912014-02-04 12:56:14 +040017endif
18
19ifdef CONFIG_SYS_BIG_ENDIAN
Masahiro Yamadaf0ac9e02014-02-28 14:33:30 +090020ARC_CROSS_COMPILE := arceb-buildroot-linux-uclibc-
Alexey Brodkin3a59d912014-02-04 12:56:14 +040021PLATFORM_LDFLAGS += -EB
Alexey Brodkin93206d22015-02-03 13:58:20 +030022PLATFORM_CPPFLAGS += -mbig-endian
Alexey Brodkin3a59d912014-02-04 12:56:14 +040023endif
24
Masahiro Yamadaf0ac9e02014-02-28 14:33:30 +090025ifeq ($(CROSS_COMPILE),)
26CROSS_COMPILE := $(ARC_CROSS_COMPILE)
27endif
28
Alexey Brodkin5e4931f2014-12-24 17:00:29 +030029ifdef CONFIG_ARC_MMU_VER
30CONFIG_MMU = 1
31endif
32
Alexey Brodkin2f020802015-02-03 13:58:19 +030033ifdef CONFIG_CPU_ARC750D
34PLATFORM_CPPFLAGS += -marc700
35endif
36
Alexey Brodkinf431e262015-02-03 13:58:11 +030037ifdef CONFIG_CPU_ARC770D
Alexey Brodkin2f020802015-02-03 13:58:19 +030038PLATFORM_CPPFLAGS += -marc700 -mlock -mswape
Alexey Brodkinf431e262015-02-03 13:58:11 +030039endif
40
Masahiro Yamada4869aee2014-07-30 14:08:23 +090041PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2
Alexey Brodkin3a59d912014-02-04 12:56:14 +040042
Alexey Brodkin3a59d912014-02-04 12:56:14 +040043# Needed for relocation
44LDFLAGS_FINAL += -pie
45
46# Load address for standalone apps
47CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000
48
49# Support generic board on ARC
50__HAVE_ARCH_GENERIC_BOARD := y