diff options
author | ian <ian@FreeBSD.org> | 2014-12-27 17:36:49 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-12-27 17:36:49 +0000 |
commit | 85cae5d907dce32e2e7cab66acb1d199238ff3b6 (patch) | |
tree | 3ff3c8e84e234b06b6a61dc82310f0a748d7c1eb | |
parent | c090fc517208e815de2a2438446d2519910461da (diff) | |
download | FreeBSD-src-85cae5d907dce32e2e7cab66acb1d199238ff3b6.zip FreeBSD-src-85cae5d907dce32e2e7cab66acb1d199238ff3b6.tar.gz |
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.
-rw-r--r-- | sys/arm/include/cpuconf.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/arm/include/cpuconf.h b/sys/arm/include/cpuconf.h index da35e57..fb02153 100644 --- a/sys/arm/include/cpuconf.h +++ b/sys/arm/include/cpuconf.h @@ -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 |