blob: 13676bd0c8e178bc36d5e410e3416c2a08b5b224 [file] [log] [blame]
Alexey Brodkin2f16ac92014-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 Brodkin1f9ad442015-02-03 13:58:14 +03007ifndef CONFIG_CPU_BIG_ENDIAN
Alexey Brodkin2f16ac92014-02-04 12:56:14 +04008CONFIG_SYS_LITTLE_ENDIAN = 1
Alexey Brodkin1f9ad442015-02-03 13:58:14 +03009else
10CONFIG_SYS_BIG_ENDIAN = 1
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040011endif
12
13ifdef CONFIG_SYS_LITTLE_ENDIAN
Masahiro Yamada574bbf42015-05-13 18:49:31 +090014ARC_CROSS_COMPILE := arc-linux-
Alexey Brodkina67ef282015-02-03 13:58:20 +030015PLATFORM_LDFLAGS += -EL
16PLATFORM_CPPFLAGS += -mlittle-endian
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040017endif
18
19ifdef CONFIG_SYS_BIG_ENDIAN
Masahiro Yamada574bbf42015-05-13 18:49:31 +090020ARC_CROSS_COMPILE := arceb-linux-
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040021PLATFORM_LDFLAGS += -EB
Alexey Brodkina67ef282015-02-03 13:58:20 +030022PLATFORM_CPPFLAGS += -mbig-endian
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040023endif
24
Masahiro Yamada9b6e2c32014-02-28 14:33:30 +090025ifeq ($(CROSS_COMPILE),)
26CROSS_COMPILE := $(ARC_CROSS_COMPILE)
27endif
28
Alexey Brodkindcb431e2014-12-24 17:00:29 +030029ifdef CONFIG_ARC_MMU_VER
30CONFIG_MMU = 1
31endif
32
Alexey Brodkin51f49992015-02-03 13:58:19 +030033ifdef CONFIG_CPU_ARC750D
Alexey Brodkin7c8d8162016-09-16 12:12:26 +030034PLATFORM_CPPFLAGS += -mcpu=arc700
Alexey Brodkin51f49992015-02-03 13:58:19 +030035endif
36
Alexey Brodkin812980b2015-02-03 13:58:11 +030037ifdef CONFIG_CPU_ARC770D
Alexey Brodkin7c8d8162016-09-16 12:12:26 +030038PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape
Alexey Brodkin812980b2015-02-03 13:58:11 +030039endif
40
Alexey Brodkinf13606b2015-01-13 18:35:46 +030041ifdef CONFIG_CPU_ARCEM6
Alexey Brodkin7c8d8162016-09-16 12:12:26 +030042PLATFORM_CPPFLAGS += -mcpu=arcem
Alexey Brodkinf13606b2015-01-13 18:35:46 +030043endif
44
45ifdef CONFIG_CPU_ARCHS34
Alexey Brodkin7a54f512016-06-16 10:55:00 +020046PLATFORM_CPPFLAGS += -mcpu=archs
Alexey Brodkinf13606b2015-01-13 18:35:46 +030047endif
48
49ifdef CONFIG_CPU_ARCHS38
Alexey Brodkin7a54f512016-06-16 10:55:00 +020050PLATFORM_CPPFLAGS += -mcpu=archs
Alexey Brodkinf13606b2015-01-13 18:35:46 +030051endif
52
Masahiro Yamada90f984e2014-07-30 14:08:23 +090053PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040054
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040055# Needed for relocation
56LDFLAGS_FINAL += -pie
57
58# Load address for standalone apps
59CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000