]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sparc: Add -mcpu= compiler flags for LEON2/LEON3
authorFrancois Retief <fgretief@spaceteq.co.za>
Mon, 26 Oct 2015 10:27:15 +0000 (12:27 +0200)
committerFrancois Retief <fgretief@spaceteq.co.za>
Fri, 13 Nov 2015 08:23:32 +0000 (10:23 +0200)
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
arch/sparc/config.mk

index d615f294fed48cb60d9141ee338bff1d944214aa..43faad48ceb1c4e8fad7141fb79415c78b974b11 100644 (file)
@@ -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