43faad48ceb1c4e8fad7141fb79415c78b974b11
[oweals/u-boot.git] / arch / sparc / config.mk
1 #
2 # (C) Copyright 2015
3 # Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com.
4 #
5 # SPDX-License-Identifier:      GPL-2.0+
6 #
7
8 ifeq ($(CROSS_COMPILE),)
9 CROSS_COMPILE := sparc-linux-
10 endif
11
12 # This GCC compiler is known to work:
13 #  https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
14
15 gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
16
17 CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) \
18                                -T $(srctree)/examples/standalone/sparc.lds
19
20 cpuflags-$(CONFIG_LEON2) := -mcpu=leon
21 cpuflags-$(CONFIG_LEON3) := -mcpu=leon3
22
23 PLATFORM_CPPFLAGS += $(cpuflags-y)
24
25 PLATFORM_RELFLAGS += -fPIC