blob: 43faad48ceb1c4e8fad7141fb79415c78b974b11 [file] [log] [blame]
Daniel Hellstrom9d7c6b22008-03-28 09:47:00 +01001#
Francois Retief335943f2015-10-26 12:27:15 +02002# (C) Copyright 2015
3# Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com.
Daniel Hellstrom9d7c6b22008-03-28 09:47:00 +01004#
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
Daniel Hellstrom9d7c6b22008-03-28 09:47:00 +01006#
7
Masahiro Yamadaf0ac9e02014-02-28 14:33:30 +09008ifeq ($(CROSS_COMPILE),)
Francois Retief335943f2015-10-26 12:27:15 +02009CROSS_COMPILE := sparc-linux-
Masahiro Yamadaf0ac9e02014-02-28 14:33:30 +090010endif
Mike Frysinger8378ba42009-06-14 23:33:14 -040011
Francois Retief335943f2015-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 Yamada958fe8f2014-03-05 16:59:40 +090015gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
16
Masahiro Yamada59f15f22014-02-04 17:24:24 +090017CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) \
Masahiro Yamadaa06c7cd2014-03-05 16:59:39 +090018 -T $(srctree)/examples/standalone/sparc.lds
Mike Frysinger5b660442009-09-03 23:12:47 -040019
Francois Retief335943f2015-10-26 12:27:15 +020020cpuflags-$(CONFIG_LEON2) := -mcpu=leon
21cpuflags-$(CONFIG_LEON3) := -mcpu=leon3
22
23PLATFORM_CPPFLAGS += $(cpuflags-y)
Masahiro Yamada156be262014-10-30 15:30:56 +090024
25PLATFORM_RELFLAGS += -fPIC