Daniel Hellstrom | 9d7c6b2 | 2008-03-28 09:47:00 +0100 | [diff] [blame] | 1 | # |
Francois Retief | 335943f | 2015-10-26 12:27:15 +0200 | [diff] [blame] | 2 | # (C) Copyright 2015 |
| 3 | # Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com. |
Daniel Hellstrom | 9d7c6b2 | 2008-03-28 09:47:00 +0100 | [diff] [blame] | 4 | # |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | # SPDX-License-Identifier: GPL-2.0+ |
Daniel Hellstrom | 9d7c6b2 | 2008-03-28 09:47:00 +0100 | [diff] [blame] | 6 | # |
| 7 | |
Masahiro Yamada | f0ac9e0 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 8 | ifeq ($(CROSS_COMPILE),) |
Francois Retief | 335943f | 2015-10-26 12:27:15 +0200 | [diff] [blame] | 9 | CROSS_COMPILE := sparc-linux- |
Masahiro Yamada | f0ac9e0 | 2014-02-28 14:33:30 +0900 | [diff] [blame] | 10 | endif |
Mike Frysinger | 8378ba4 | 2009-06-14 23:33:14 -0400 | [diff] [blame] | 11 | |
Francois Retief | 335943f | 2015-10-26 12:27:15 +0200 | [diff] [blame] | 12 | # This GCC compiler is known to work: |
| 13 | # https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/ |
| 14 | |
Masahiro Yamada | 958fe8f | 2014-03-05 16:59:40 +0900 | [diff] [blame] | 15 | gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`) |
| 16 | |
Masahiro Yamada | 59f15f2 | 2014-02-04 17:24:24 +0900 | [diff] [blame] | 17 | CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) \ |
Masahiro Yamada | a06c7cd | 2014-03-05 16:59:39 +0900 | [diff] [blame] | 18 | -T $(srctree)/examples/standalone/sparc.lds |
Mike Frysinger | 5b66044 | 2009-09-03 23:12:47 -0400 | [diff] [blame] | 19 | |
Francois Retief | 335943f | 2015-10-26 12:27:15 +0200 | [diff] [blame] | 20 | cpuflags-$(CONFIG_LEON2) := -mcpu=leon |
| 21 | cpuflags-$(CONFIG_LEON3) := -mcpu=leon3 |
| 22 | |
| 23 | PLATFORM_CPPFLAGS += $(cpuflags-y) |
Masahiro Yamada | 156be26 | 2014-10-30 15:30:56 +0900 | [diff] [blame] | 24 | |
| 25 | PLATFORM_RELFLAGS += -fPIC |