blob: 118472b2d0ba21e9e5a4a7092f3d6bd5ea979056 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Alexey Brodkin2f16ac92014-02-04 12:56:14 +04002#
3# Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
Alexey Brodkin2f16ac92014-02-04 12:56:14 +04004
Alexey Brodkin1f9ad442015-02-03 13:58:14 +03005ifndef CONFIG_CPU_BIG_ENDIAN
Alexey Brodkin2f16ac92014-02-04 12:56:14 +04006CONFIG_SYS_LITTLE_ENDIAN = 1
Alexey Brodkin1f9ad442015-02-03 13:58:14 +03007else
8CONFIG_SYS_BIG_ENDIAN = 1
Alexey Brodkin2f16ac92014-02-04 12:56:14 +04009endif
10
11ifdef CONFIG_SYS_LITTLE_ENDIAN
Tom Rini587e4a42020-03-27 11:46:27 -040012KBUILD_LDFLAGS += -EL
Alexey Brodkina67ef282015-02-03 13:58:20 +030013PLATFORM_CPPFLAGS += -mlittle-endian
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040014endif
15
16ifdef CONFIG_SYS_BIG_ENDIAN
Tom Rini587e4a42020-03-27 11:46:27 -040017KBUILD_LDFLAGS += -EB
Alexey Brodkina67ef282015-02-03 13:58:20 +030018PLATFORM_CPPFLAGS += -mbig-endian
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040019endif
20
Alexey Brodkindcb431e2014-12-24 17:00:29 +030021ifdef CONFIG_ARC_MMU_VER
22CONFIG_MMU = 1
23endif
24
Alexey Brodkind53b1282018-02-15 15:34:58 +030025PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata
Alexey Brodkin6e633142018-10-11 23:12:05 +030026PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections -fno-common
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040027
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040028# Needed for relocation
Alexey Brodkinfac47902018-01-25 00:25:12 +030029LDFLAGS_FINAL += -pie --gc-sections
Alexey Brodkin2f16ac92014-02-04 12:56:14 +040030
31# Load address for standalone apps
32CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000