Date: Tue, 10 Nov 2020 21:12:32 +0000 (UTC) From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367579 - head/sys/conf Message-ID: <202011102112.0AALCWgK033207@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brooks Date: Tue Nov 10 21:12:32 2020 New Revision: 367579 URL: https://svnweb.freebsd.org/changeset/base/367579 Log: Be more tolerant of share/mk and kern.mk mismatch When building out-of-tree modules, it appears that the system share/mk is used, but sys/conf/kern.mk is used. That results in MK_INIT_ALL_ZERO being undefined. In the interest of maximum compatability, check that MK_INIT_ALL_* and COMPILER_FEATURES are defined before comparing their values. Reported by: mmacy Sponsored by: DARPA Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Nov 10 19:54:39 2020 (r367578) +++ head/sys/conf/kern.mk Tue Nov 10 21:12:32 2020 (r367579) @@ -230,15 +230,15 @@ CFLAGS+= -mretpoline # # Initialize stack variables on function entry # -.if ${MK_INIT_ALL_ZERO} == "yes" -.if ${COMPILER_FEATURES:Minit-all} +.if defined(MK_INIT_ALL_ZERO) && ${MK_INIT_ALL_ZERO} == "yes" +.if defined(COMPILER_FEATURES) && ${COMPILER_FEATURES:Minit-all} CFLAGS+= -ftrivial-auto-var-init=zero \ -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang .else .warning InitAll (zeros) requested but not support by compiler .endif -.elif ${MK_INIT_ALL_PATTERN} == "yes" -.if ${COMPILER_FEATURES:Minit-all} +.elif defined(MK_INIT_ALL_PATTERN) && ${MK_INIT_ALL_PATTERN} == "yes" +.if defined(COMPILER_FEATURES) && ${COMPILER_FEATURES:Minit-all} CFLAGS+= -ftrivial-auto-var-init=pattern .else .warning InitAll (pattern) requested but not support by compiler
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011102112.0AALCWgK033207>