kernel: Normalize conf/files rules.
authorzrj <rimvydas.jasinskas@gmail.com>
Mon, 28 May 2018 14:24:32 +0000 (17:24 +0300)
committerzrj <zrj@dragonflybsd.org>
Tue, 29 May 2018 07:07:35 +0000 (10:07 +0300)
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.

sys/platform/pc64/conf/files
sys/platform/vkernel64/conf/files

index 0a14fa7..f7b6114 100644 (file)
@@ -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
 
index 46e5b21..af2ffad 100644 (file)
@@ -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