@@ -4752,6 +4752,24 @@ if compile_prog "" "" ; then
syncfs=yes
fi
+# check for kcov support (kernel must be 4.4+, compiled with certain options)
+kcov=no
+cat > $TMPC << EOF
+#include <sys/kcov.h>
+
+int main(void)
+{
+ ioctl(-1, KCOV_ENABLE, NULL);
+ ioctl(-1, KCOV_DISABLE, NULL);
+ ioctl(-1, KCOV_INIT_TRACE, NULL);
+
+ return 0;
+}
+EOF
+if compile_prog "" "" ; then
+ kcov=yes
+fi
+
# Check we have a new enough version of sphinx-build
has_sphinx_build() {
# This is a bit awkward but works: create a trivial document and
@@ -6874,6 +6892,9 @@ fi
if test "$syncfs" = "yes" ; then
echo "CONFIG_SYNCFS=y" >> $config_host_mak
fi
+if test "$kcov" = "yes" ; then
+ echo "CONFIG_KCOV=y" >> $config_host_mak
+fi
if test "$inotify" = "yes" ; then
echo "CONFIG_INOTIFY=y" >> $config_host_mak
fi