3 # Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com.
5 # SPDX-License-Identifier: GPL-2.0+
8 ifeq ($(CROSS_COMPILE),)
9 CROSS_COMPILE := sparc-linux-
12 # This GCC compiler is known to work:
13 # https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
15 gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
17 CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) \
18 -T $(srctree)/examples/standalone/sparc.lds
20 cpuflags-$(CONFIG_LEON2) := -mcpu=leon
21 cpuflags-$(CONFIG_LEON3) := -mcpu=leon3
23 PLATFORM_CPPFLAGS += $(cpuflags-y)
25 PLATFORM_RELFLAGS += -fPIC