blob: d255c90e3540ed9628bc5be5a31dffc8fea69eb5 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Alexey Brodkin3a59d912014-02-04 12:56:14 +04002#
3# Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
Alexey Brodkin3a59d912014-02-04 12:56:14 +04004
Alexey Brodkincbd76c32015-02-03 13:58:14 +03005ifndef CONFIG_CPU_BIG_ENDIAN
Alexey Brodkin3a59d912014-02-04 12:56:14 +04006CONFIG_SYS_LITTLE_ENDIAN = 1
Alexey Brodkincbd76c32015-02-03 13:58:14 +03007else
8CONFIG_SYS_BIG_ENDIAN = 1
Alexey Brodkin3a59d912014-02-04 12:56:14 +04009endif
10
11ifdef CONFIG_SYS_LITTLE_ENDIAN
Alexey Brodkin93206d22015-02-03 13:58:20 +030012PLATFORM_LDFLAGS += -EL
13PLATFORM_CPPFLAGS += -mlittle-endian
Alexey Brodkin3a59d912014-02-04 12:56:14 +040014endif
15
16ifdef CONFIG_SYS_BIG_ENDIAN
Alexey Brodkin3a59d912014-02-04 12:56:14 +040017PLATFORM_LDFLAGS += -EB
Alexey Brodkin93206d22015-02-03 13:58:20 +030018PLATFORM_CPPFLAGS += -mbig-endian
Alexey Brodkin3a59d912014-02-04 12:56:14 +040019endif
20
Alexey Brodkin5e4931f2014-12-24 17:00:29 +030021ifdef CONFIG_ARC_MMU_VER
22CONFIG_MMU = 1
23endif
24
Alexey Brodkin2f020802015-02-03 13:58:19 +030025ifdef CONFIG_CPU_ARC750D
Alexey Brodkin2fcaf4f2016-09-16 12:12:26 +030026PLATFORM_CPPFLAGS += -mcpu=arc700
Alexey Brodkin2f020802015-02-03 13:58:19 +030027endif
28
Alexey Brodkinf431e262015-02-03 13:58:11 +030029ifdef CONFIG_CPU_ARC770D
Alexey Brodkin2fcaf4f2016-09-16 12:12:26 +030030PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape
Alexey Brodkinf431e262015-02-03 13:58:11 +030031endif
32
Alexey Brodkine41a3d52015-01-13 18:35:46 +030033ifdef CONFIG_CPU_ARCEM6
Alexey Brodkin2fcaf4f2016-09-16 12:12:26 +030034PLATFORM_CPPFLAGS += -mcpu=arcem
Alexey Brodkine41a3d52015-01-13 18:35:46 +030035endif
36
37ifdef CONFIG_CPU_ARCHS34
Alexey Brodkin2e541972016-06-16 10:55:00 +020038PLATFORM_CPPFLAGS += -mcpu=archs
Alexey Brodkine41a3d52015-01-13 18:35:46 +030039endif
40
41ifdef CONFIG_CPU_ARCHS38
Alexey Brodkin2e541972016-06-16 10:55:00 +020042PLATFORM_CPPFLAGS += -mcpu=archs
Alexey Brodkine41a3d52015-01-13 18:35:46 +030043endif
44
Alexey Brodkinadb45be2018-02-15 15:34:58 +030045PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata
Alexey Brodkin887ca452018-01-25 00:25:12 +030046PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
Alexey Brodkin3a59d912014-02-04 12:56:14 +040047
Alexey Brodkin3a59d912014-02-04 12:56:14 +040048# Needed for relocation
Alexey Brodkin887ca452018-01-25 00:25:12 +030049LDFLAGS_FINAL += -pie --gc-sections
Alexey Brodkin3a59d912014-02-04 12:56:14 +040050
51# Load address for standalone apps
52CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000