From: zrj Date: Mon, 28 May 2018 14:24:32 +0000 (+0300) Subject: kernel: Normalize conf/files rules. X-Git-Tag: v5.5.0~554 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/3c996f4107ee33e18a9914b21d7e2eed8d153c2a kernel: Normalize conf/files rules. Prefer to use config(8) variables to reduce duplication In the recipies for atomic.c we override global -fno-frame-pointer only if not profiling (at the moment unusable .mcount), add missing ${WERROR}. For vkernel64/mp.c just swap additions for consistency. We could merge the ${WERROR} directly into ${NORMAL_C} later on. --- diff --git a/sys/platform/pc64/conf/files b/sys/platform/pc64/conf/files index 0a14fa7a44..f7b611465b 100644 --- a/sys/platform/pc64/conf/files +++ b/sys/platform/pc64/conf/files @@ -115,7 +115,7 @@ vfs/smbfs/smbfs_vfsops.c optional smbfs vfs/smbfs/smbfs_vnops.c optional smbfs cpu/x86_64/misc/atomic.c standard \ - compile-with "${CC} -c ${CFLAGS} ${WERROR} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} ${.IMPSRC}" + compile-with "${NORMAL_C} ${empty(DEFINED_PROF):?-fomit-frame-pointer:} ${WERROR}" platform/pc64/x86_64/autoconf.c standard platform/pc64/x86_64/mpboot.S standard diff --git a/sys/platform/vkernel64/conf/files b/sys/platform/vkernel64/conf/files index 46e5b2199d..af2ffad9c7 100644 --- a/sys/platform/vkernel64/conf/files +++ b/sys/platform/vkernel64/conf/files @@ -13,10 +13,10 @@ vfs/smbfs/smbfs_subr.c optional smbfs vfs/smbfs/smbfs_vfsops.c optional smbfs vfs/smbfs/smbfs_vnops.c optional smbfs cpu/x86_64/misc/atomic.c standard \ - compile-with "${CC} -c ${CFLAGS} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} ${.IMPSRC}" + compile-with "${NORMAL_C} ${empty(DEFINED_PROF):?-fomit-frame-pointer:} ${WERROR}" platform/vkernel64/x86_64/autoconf.c standard platform/vkernel64/x86_64/mp.c standard \ - compile-with "${CC} -c -pthread ${CFLAGS} -I/usr/include ${.IMPSRC}" + compile-with "${NORMAL_C} -pthread -I/usr/include ${WERROR}" # # DDB XXX cpu/x86_64/misc/elf_machdep.c standard