summaryrefslogtreecommitdiff
path: root/core/riscv-rv32i/build.mk
blob: c8d7328a3a249f1e2f842db3307798e2213bc14b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- makefile -*-
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# RISC-V core OS files build
#

# Select RISC-V bare-metal toolchain
$(call set-option,CROSS_COMPILE,$(CROSS_COMPILE_riscv),\
	/opt/coreboot-sdk/bin/riscv64-elf-)

# CPU specific compilation flags
CFLAGS_CPU+=-march=rv32imafc -mabi=ilp32f -Os
LDFLAGS_EXTRA+=-mrelax
LDFLAGS_EXTRA+=-static-libgcc -lgcc

core-y=cpu.o init.o panic.o task.o switch.o __builtin.o math.o