From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 17:36:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 763EBDA4; Sat, 27 Dec 2014 17:36:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61DE0645DC; Sat, 27 Dec 2014 17:36:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRHaovP005570; Sat, 27 Dec 2014 17:36:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRHaoHl005569; Sat, 27 Dec 2014 17:36:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412271736.sBRHaoHl005569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 17:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276312 - stable/10/sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 17:36:50 -0000 Author: ian Date: Sat Dec 27 17:36:49 2014 New Revision: 276312 URL: https://svnweb.freebsd.org/changeset/base/276312 Log: 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. Modified: stable/10/sys/arm/include/cpuconf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/include/cpuconf.h ============================================================================== --- stable/10/sys/arm/include/cpuconf.h Sat Dec 27 17:20:24 2014 (r276311) +++ stable/10/sys/arm/include/cpuconf.h Sat Dec 27 17:36:49 2014 (r276312) @@ -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