# -*- makefile -*-
#
# arch/cris/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
KLIBCBITSIZE  = 32

# Extra linkflags when building the shared version of the library
# This address needs to be reachable using normal inter-module
# calls, and work on the memory models for this architecture
# 224 MB - normal binaries start at 0
# (lib?)gcc on cris seems to insist on producing .init and .fini sections
KLIBCSHAREDFLAGS     = --section-start .init=0x0e000100

# The CRIS compiler needs an -iprefix to find libgcc includes when
# nostdinc is used. It also needs -mlinux to compile linux applications.
INCLUDE_PREFIX  = $(shell $(CC) -print-libgcc-file-name | sed -e s/libgcc.a//)
KLIBCARCHREQFLAGS = -iprefix $(INCLUDE_PREFIX) -mlinux

# Special flags needed for linking
KLIBCLDFLAGS 	+= -mcrislinux
