summaryrefslogtreecommitdiff
path: root/scripts/Makefile.toolchain.riscv32
blob: 1716c05edb9065e97b70579ecb2e34fcac3e8200 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
ifndef RISCV32_TOOLCHAIN_PATH
$(error RISCV32_TOOLCHAIN_PATH is not set)
endif

CROSS_COMPILE = ${RISCV32_TOOLCHAIN_PATH}/bin/riscv32-unknown-elf-

TOOLCHAIN_LIBS = gcc
LIBGCC_DIR = $(shell dirname `$(CROSS_COMPILE)gcc ${KBUILD_CFLAGS} -print-libgcc-file-name`)

LIB_INCLUDE_DIR += -L ${LIBGCC_DIR}
TOOLCHAIN_CFLAGS = -I${RISCV32_TOOLCHAIN_PATH}/include

export CROSS_COMPILE TOOLCHAIN_LIBS TOOLCHAIN_CFLAGS LIB_INCLUDE_DIR