# -*- makefile -*-
#
# arch/riscv64/MCONFIG
#
# Special rules for this architecture.  Note that this is actually
# included from the main Makefile, and that pathnames should be
# accordingly.
#

KLIBCOPTFLAGS	  += -Os -fomit-frame-pointer
ifeq ($(DEBUG),y)
KLIBCOPTFLAGS     += -g
endif
KLIBCBITSIZE      = 64

# Normal binaries start at 64 KB, so start the libary at 2 MB.
KLIBCSHAREDFLAGS  = $(LD_IMAGE_BASE_OPT) 0x00200000
KLIBCSHAREDFLAGS  += --defsym '__global_pointer$$=0'

# Kernel has never used stack trampolines
KLIBCEXECSTACK := n

KLIBCEMAIN        := -e _main
KLIBCCRTSHARED    += $(KLIBCOBJ)/arch/riscv64/_main.o
