blob: b713fa3054c00acf7f16f79222160c9646b9ce9f [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 Brodkin3a59d912014-02-04 12:56:14 +04005ifdef CONFIG_SYS_LITTLE_ENDIAN
Tom Rini5d4ecf22020-03-27 11:46:27 -04006KBUILD_LDFLAGS += -EL
Alexey Brodkin93206d22015-02-03 13:58:20 +03007PLATFORM_CPPFLAGS += -mlittle-endian
Alexey Brodkin3a59d912014-02-04 12:56:14 +04008endif
9
10ifdef CONFIG_SYS_BIG_ENDIAN
Tom Rini5d4ecf22020-03-27 11:46:27 -040011KBUILD_LDFLAGS += -EB
Alexey Brodkin93206d22015-02-03 13:58:20 +030012PLATFORM_CPPFLAGS += -mbig-endian
Alexey Brodkin3a59d912014-02-04 12:56:14 +040013endif
14
Alexey Brodkin5e4931f2014-12-24 17:00:29 +030015ifdef CONFIG_ARC_MMU_VER
16CONFIG_MMU = 1
17endif
18
Alexey Brodkinadb45be2018-02-15 15:34:58 +030019PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata
Alexey Brodkin1c0c7082018-10-11 23:12:05 +030020PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections -fno-common
Alexey Brodkin3a59d912014-02-04 12:56:14 +040021
Alexey Brodkin3a59d912014-02-04 12:56:14 +040022# Needed for relocation
Alexey Brodkin887ca452018-01-25 00:25:12 +030023LDFLAGS_FINAL += -pie --gc-sections