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