2008-03-28 08:47:00 +00:00
|
|
|
#
|
2015-10-26 10:27:15 +00:00
|
|
|
# (C) Copyright 2015
|
|
|
|
# Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com.
|
2008-03-28 08:47:00 +00:00
|
|
|
#
|
2013-07-08 07:37:19 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2008-03-28 08:47:00 +00:00
|
|
|
#
|
|
|
|
|
2014-02-28 05:33:30 +00:00
|
|
|
ifeq ($(CROSS_COMPILE),)
|
2015-10-26 10:27:15 +00:00
|
|
|
CROSS_COMPILE := sparc-linux-
|
2014-02-28 05:33:30 +00:00
|
|
|
endif
|
2009-06-15 03:33:14 +00:00
|
|
|
|
2015-10-26 10:27:15 +00:00
|
|
|
# This GCC compiler is known to work:
|
|
|
|
# https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
|
|
|
|
|
2014-03-05 07:59:40 +00:00
|
|
|
gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
|
|
|
|
|
2014-02-04 08:24:24 +00:00
|
|
|
CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) \
|
2014-03-05 07:59:39 +00:00
|
|
|
-T $(srctree)/examples/standalone/sparc.lds
|
2009-09-04 03:12:47 +00:00
|
|
|
|
2015-10-26 10:27:15 +00:00
|
|
|
cpuflags-$(CONFIG_LEON2) := -mcpu=leon
|
|
|
|
cpuflags-$(CONFIG_LEON3) := -mcpu=leon3
|
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += $(cpuflags-y)
|
2014-10-30 06:30:56 +00:00
|
|
|
|
|
|
|
PLATFORM_RELFLAGS += -fPIC
|