kern.pre.mk (310fc6c533459ac675558206a20947b83d7eb337) | kern.pre.mk (8eb1a0ce5654fe5109e2edb0a90ecb09f29c5a28) |
---|---|
1# $FreeBSD$ 2 3# Part of a unified Makefile for building kernels. This part contains all 4# of the definitions that need to be before %BEFORE_DEPEND. 5 6# Allow user to configure things that only effect src tree builds. 7# Note: This is duplicated from src.sys.mk to ensure that we include 8# /etc/src.conf when building the kernel. Kernels can be built without --- 72 unchanged lines hidden (view full) --- 81 82CFLAGS= ${COPTFLAGS} ${DEBUG} 83CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h 84CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100 85CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000 86.if ${MACHINE_CPUARCH} == "mips" 87CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 -DMACHINE_ARCH='"${MACHINE_ARCH}"' 88.endif | 1# $FreeBSD$ 2 3# Part of a unified Makefile for building kernels. This part contains all 4# of the definitions that need to be before %BEFORE_DEPEND. 5 6# Allow user to configure things that only effect src tree builds. 7# Note: This is duplicated from src.sys.mk to ensure that we include 8# /etc/src.conf when building the kernel. Kernels can be built without --- 72 unchanged lines hidden (view full) --- 81 82CFLAGS= ${COPTFLAGS} ${DEBUG} 83CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h 84CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100 85CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000 86.if ${MACHINE_CPUARCH} == "mips" 87CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 -DMACHINE_ARCH='"${MACHINE_ARCH}"' 88.endif |
89CFLAGS.gcc+= -fno-common -fms-extensions -finline-limit=${INLINE_LIMIT} | 89CFLAGS.gcc+= -fms-extensions -finline-limit=${INLINE_LIMIT} |
90CFLAGS.gcc+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH} 91CFLAGS.gcc+= --param large-function-growth=${CFLAGS_PARAM_LARGE_FUNCTION_GROWTH} 92CFLAGS.gcc+= -fms-extensions 93.if defined(CFLAGS_ARCH_PARAMS) 94CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS} 95.endif 96.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000 97WERROR?= -Wno-error 98.else 99WERROR?= -Werror 100.endif | 90CFLAGS.gcc+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH} 91CFLAGS.gcc+= --param large-function-growth=${CFLAGS_PARAM_LARGE_FUNCTION_GROWTH} 92CFLAGS.gcc+= -fms-extensions 93.if defined(CFLAGS_ARCH_PARAMS) 94CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS} 95.endif 96.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000 97WERROR?= -Wno-error 98.else 99WERROR?= -Werror 100.endif |
101# The following should be removed no earlier than LLVM11 being imported into the 102# tree, to ensure we don't regress the build. LLVM11 and GCC10 will switch the 103# default over to -fno-common, making this redundant. 104CFLAGS+= -fno-common |
|
101 102# XXX LOCORE means "don't declare C stuff" not "for locore.s". 103ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC:T}} 104 105.if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 106CFLAGS+= -DGPROF 107CFLAGS.gcc+= -falign-functions=16 108.if ${PROFLEVEL} >= 2 --- 245 unchanged lines hidden --- | 105 106# XXX LOCORE means "don't declare C stuff" not "for locore.s". 107ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC:T}} 108 109.if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 110CFLAGS+= -DGPROF 111CFLAGS.gcc+= -falign-functions=16 112.if ${PROFLEVEL} >= 2 --- 245 unchanged lines hidden --- |