[U-Boot] [PATCH v2 03/12] sparc: Add -mcpu= compiler flags for LEON2/LEON3

Francois Retief fgretief at spaceteq.co.za
Fri Nov 13 09:33:40 CET 2015


Signed-off-by: Francois Retief <fgretief at spaceteq.co.za>
---

 arch/sparc/config.mk | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/sparc/config.mk b/arch/sparc/config.mk
index d615f29..43faad4 100644
--- a/arch/sparc/config.mk
+++ b/arch/sparc/config.mk
@@ -1,19 +1,25 @@
 #
-# (C) Copyright 2007
-# Daniel Hellstrom, Gaisler Research, daniel at gaisler.com
+# (C) Copyright 2015
+# Daniel Hellstrom, Cobham Gaisler, daniel at 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
--
2.4.3


________________________________
Disclaimer and confidentiality note – refer to our website for further details: www.spaceteq.co.za <http://www.spaceteq.co.za/home/emaildisclaimer/>


More information about the U-Boot mailing list