Created attachment 178906 [details] patch for __ARM_ARCH_6KZ__ arm's cpufunc.h doesn't use the __ARM_ARCH_6KZ__ define which clang (since 3.8) defines. See PR 216065 for fallout of this with sysutils/lsof. Vic Abell has worked around it, but we should fix it. see: Comment #9 from mikael.urankar@gmail.com --- ARM_NARCH and ARM_NMMUS are 0 because clang defines __ARM_ARCH_6KZ__ since clang3.8 iirc. 6ZK is a mispelling of 6KZ: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01679.html
to test that the issue is fixed, you CAN USE LSOF 4.90G FROM MASTER_SITE_LOCAL/ler/lsof without the patches I applied.
A commit references this bug: Author: ian Date: Mon Jan 16 16:44:14 UTC 2017 New revision: 312292 URL: https://svnweb.freebsd.org/changeset/base/312292 Log: Remove arm's cpuconf.h, and references to it, after moving a few lines from it into pmap-v4.h where they are used. Other than those few lines of support for different MMU types, nothing in cpuconf.h has been used in our code for quite a while. The file existed to set up a variety of symbols to describe the architecture. Over the past few years we have converted all of our source to use the new architecture symbols standardized by ARM Inc, and predefined by both clang and gcc. PR: 216104 Changes: head/sys/arm/arm/bus_space_asm_generic.S head/sys/arm/arm/cpufunc.c head/sys/arm/arm/identcpu-v4.c head/sys/arm/arm/locore-v4.S head/sys/arm/arm/locore-v6.S head/sys/arm/include/atomic.h head/sys/arm/include/cpuconf.h head/sys/arm/include/cpufunc.h head/sys/arm/include/pcpu.h head/sys/arm/include/pmap-v4.h
Instead of applying the supplied patch (thanks!), I just deleted the whole cpuconf.h file, and thus removed the unnecessary check that was failing when the file got included by lsof. This fix can be MFC'd to stable-11, but perhaps not to stable-10 (some kernel sources in 10 may still refer to the old arch symbols from cpuconf.h), so the workaround applied to lsof in bug 216065 may have to remain in place for a while.