summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorFrancois Retief <fgretief@spaceteq.co.za>2015-10-26 12:27:15 +0200
committerFrancois Retief <fgretief@spaceteq.co.za>2015-11-13 10:23:32 +0200
commitc33759aebdb390ba20fa40a97e9d6f3cd19371f6 (patch)
tree932eb2e68cdf7feb3fb7c7009b1a724da0cf8ae8 /arch/sparc
parentfdf075fbeef6da2ffebab03268974ad81f10fc84 (diff)
downloadu-boot-c33759aebdb390ba20fa40a97e9d6f3cd19371f6.tar.gz
u-boot-c33759aebdb390ba20fa40a97e9d6f3cd19371f6.tar.bz2
u-boot-c33759aebdb390ba20fa40a97e9d6f3cd19371f6.zip
sparc: Add -mcpu= compiler flags for LEON2/LEON3
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/config.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/sparc/config.mk b/arch/sparc/config.mk
index d615f294fe..43faad48ce 100644
--- a/arch/sparc/config.mk
+++ b/arch/sparc/config.mk
@@ -1,19 +1,25 @@
#
-# (C) Copyright 2007
-# Daniel Hellstrom, Gaisler Research, daniel@gaisler.com
+# (C) Copyright 2015
+# Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com.
#
# SPDX-License-Identifier: GPL-2.0+
#
ifeq ($(CROSS_COMPILE),)
-CROSS_COMPILE := sparc-elf-
+CROSS_COMPILE := sparc-linux-
endif
+# This GCC compiler is known to work:
+# https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
+
gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) \
-T $(srctree)/examples/standalone/sparc.lds
-PLATFORM_CPPFLAGS += -D__sparc__
+cpuflags-$(CONFIG_LEON2) := -mcpu=leon
+cpuflags-$(CONFIG_LEON3) := -mcpu=leon3
+
+PLATFORM_CPPFLAGS += $(cpuflags-y)
PLATFORM_RELFLAGS += -fPIC