1# 2# Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. 3# 4# SPDX-License-Identifier: GPL-2.0+ 5# 6 7ifndef CONFIG_CPU_BIG_ENDIAN 8CONFIG_SYS_LITTLE_ENDIAN = 1 9else 10CONFIG_SYS_BIG_ENDIAN = 1 11endif 12 13ifdef CONFIG_SYS_LITTLE_ENDIAN 14ARC_CROSS_COMPILE := arc-linux- 15PLATFORM_LDFLAGS += -EL 16PLATFORM_CPPFLAGS += -mlittle-endian 17endif 18 19ifdef CONFIG_SYS_BIG_ENDIAN 20ARC_CROSS_COMPILE := arceb-linux- 21PLATFORM_LDFLAGS += -EB 22PLATFORM_CPPFLAGS += -mbig-endian 23endif 24 25ifeq ($(CROSS_COMPILE),) 26CROSS_COMPILE := $(ARC_CROSS_COMPILE) 27endif 28 29ifdef CONFIG_ARC_MMU_VER 30CONFIG_MMU = 1 31endif 32 33ifdef CONFIG_CPU_ARC750D 34PLATFORM_CPPFLAGS += -mcpu=arc700 35endif 36 37ifdef CONFIG_CPU_ARC770D 38PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape 39endif 40 41ifdef CONFIG_CPU_ARCEM6 42PLATFORM_CPPFLAGS += -mcpu=arcem 43endif 44 45ifdef CONFIG_CPU_ARCHS34 46PLATFORM_CPPFLAGS += -mcpu=archs 47endif 48 49ifdef CONFIG_CPU_ARCHS38 50PLATFORM_CPPFLAGS += -mcpu=archs 51endif 52 53PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata 54PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections 55 56# Needed for relocation 57LDFLAGS_FINAL += -pie --gc-sections 58 59# Load address for standalone apps 60CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000 61