MFC r276165, r276166:

Define the old-school arm arch constants we still use internally based on
  the somewhat newer constants predefined by the compiler.  This will allow
  userland apps to use various machine/foo.h headers without CPUTYPE defined.
This commit is contained in:
ian 2014-12-27 17:36:49 +00:00
parent c090fc5172
commit 85cae5d907

View File

@ -99,6 +99,29 @@
#endif
#define ARM_NARCH (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 | ARM_ARCH_7A)
/*
* Compatibility for userland builds that have no CPUTYPE defined. Use the ARCH
* constants predefined by the compiler to define our old-school arch constants.
* This is a stopgap measure to tide us over until the conversion of all code
* to the newer ACLE constants defined by ARM (see acle-compat.h).
*/
#if ARM_NARCH == 0
#if defined(__ARM_ARCH_4T__)
#undef ARM_ARCH_4
#undef ARM_NARCH
#define ARM_ARCH_4 1
#define ARM_NARCH 1
#define CPU_ARM9 1
#elif defined(__ARM_ARCH_6ZK__)
#undef ARM_ARCH_6
#undef ARM_NARCH
#define ARM_ARCH_6 1
#define ARM_NARCH 1
#define CPU_ARM1176 1
#endif
#endif
#if ARM_NARCH == 0 && !defined(KLD_MODULE) && defined(_KERNEL)
#error ARM_NARCH is 0
#endif