blob: 43faad48ceb1c4e8fad7141fb79415c78b974b11 [file] [log] [blame]
Daniel Hellstromc2f02da2008-03-28 09:47:00 +01001#
Francois Retiefc33759a2015-10-26 12:27:15 +02002# (C) Copyright 2015
3# Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com.
Daniel Hellstromc2f02da2008-03-28 09:47:00 +01004#
Wolfgang Denk1a459662013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
Daniel Hellstromc2f02da2008-03-28 09:47:00 +01006#
7
Masahiro Yamada9b6e2c32014-02-28 14:33:30 +09008ifeq ($(CROSS_COMPILE),)
Francois Retiefc33759a2015-10-26 12:27:15 +02009CROSS_COMPILE := sparc-linux-
Masahiro Yamada9b6e2c32014-02-28 14:33:30 +090010endif
Mike Frysinger1ea6bcd2009-06-14 23:33:14 -040011
Francois Retiefc33759a2015-10-26 12:27:15 +020012# This GCC compiler is known to work:
13# https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
14
Masahiro Yamada026f9cf2014-03-05 16:59:40 +090015gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
16
Masahiro Yamada9e414032014-02-04 17:24:24 +090017CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) \
Masahiro Yamadaa0a15b42014-03-05 16:59:39 +090018 -T $(srctree)/examples/standalone/sparc.lds
Mike Frysinger262ae0a2009-09-03 23:12:47 -040019
Francois Retiefc33759a2015-10-26 12:27:15 +020020cpuflags-$(CONFIG_LEON2) := -mcpu=leon
21cpuflags-$(CONFIG_LEON3) := -mcpu=leon3
22
23PLATFORM_CPPFLAGS += $(cpuflags-y)
Masahiro Yamadac2a1d5d2014-10-30 15:30:56 +090024
25PLATFORM_RELFLAGS += -fPIC