Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 2 | # |
| 3 | # Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 4 | |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 5 | ifdef CONFIG_SYS_LITTLE_ENDIAN |
Tom Rini | 587e4a4 | 2020-03-27 11:46:27 -0400 | [diff] [blame] | 6 | KBUILD_LDFLAGS += -EL |
Alexey Brodkin | a67ef28 | 2015-02-03 13:58:20 +0300 | [diff] [blame] | 7 | PLATFORM_CPPFLAGS += -mlittle-endian |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 8 | endif |
| 9 | |
| 10 | ifdef CONFIG_SYS_BIG_ENDIAN |
Tom Rini | 587e4a4 | 2020-03-27 11:46:27 -0400 | [diff] [blame] | 11 | KBUILD_LDFLAGS += -EB |
Alexey Brodkin | a67ef28 | 2015-02-03 13:58:20 +0300 | [diff] [blame] | 12 | PLATFORM_CPPFLAGS += -mbig-endian |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 13 | endif |
| 14 | |
Alexey Brodkin | dcb431e | 2014-12-24 17:00:29 +0300 | [diff] [blame] | 15 | ifdef CONFIG_ARC_MMU_VER |
| 16 | CONFIG_MMU = 1 |
| 17 | endif |
| 18 | |
Alexey Brodkin | d53b128 | 2018-02-15 15:34:58 +0300 | [diff] [blame] | 19 | PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata |
Alexey Brodkin | 6e63314 | 2018-10-11 23:12:05 +0300 | [diff] [blame] | 20 | PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections -fno-common |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 21 | |
Alexey Brodkin | 2f16ac9 | 2014-02-04 12:56:14 +0400 | [diff] [blame] | 22 | # Needed for relocation |
Alexey Brodkin | fac4790 | 2018-01-25 00:25:12 +0300 | [diff] [blame] | 23 | LDFLAGS_FINAL += -pie --gc-sections |