Remove the gross hack for the Octeon Simple Executive to the least

intrusive place for it to be: the octeon std file.
Fix a comment while I'm here.
Allow for future architectural specific flags.

Reviewed by:	jmallet@
This commit is contained in:
Warner Losh 2013-11-06 05:26:15 +00:00
parent 7483233695
commit bf100f266b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257735
2 changed files with 14 additions and 9 deletions

View File

@ -80,16 +80,17 @@ INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe
CFLAGS= ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS}
CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100
CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000
.if ${MACHINE_CPUARCH} == "mips"
CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000
.endif
.if ${COMPILER_TYPE} != "clang"
CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
.if ${MACHINE_CPUARCH} != "mips"
CFLAGS+= --param inline-unit-growth=100
CFLAGS+= --param large-function-growth=1000
.else
# XXX Actually a gross hack just for Octeon because of the Simple Executive.
CFLAGS+= --param inline-unit-growth=10000
CFLAGS+= --param large-function-growth=100000
CFLAGS+= --param max-inline-insns-single=10000
CFLAGS+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH}
CFLAGS+= --param large-function-growth=${CFLAGS_PARAM_LARGE_FUNCTION_GROWTH}
.if defined(CFLAGS_ARCH_PARAMS)
CFLAGS+=${CFLAGS_ARCH_PARAMS}
.endif
.endif
WERROR?= -Werror
@ -193,7 +194,7 @@ MKMODULESENV+= WITHOUT_MODULES="${WITHOUT_MODULES}"
MKMODULESENV+= DEBUG_FLAGS="${DEBUG}"
.endif
# Are various things configured?
# Detect knerel config options that force stack frames to be turned on.
DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo
DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo
HWPMC_ENABLED!= grep HWPMC opt_hwpmc_hooks.h || true ; echo

View File

@ -3,3 +3,7 @@
files "../cavium/files.octeon1"
machine mips mips64
cpu CPU_CNMIPS
makeoptions CFLAGS_PARAM_INLINE_UNIT_GROWTH=10000
makeoptions CFLAGS_PARAM_LARGE_FUNCTION_GROWTH=100000
makeoptions CFLAGS_ARCH_PARAMS="--param max-inline-insns-single=10000"