From owner-freebsd-arm@FreeBSD.ORG Sun Jun 24 00:04:49 2012 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD89E1065675 for ; Sun, 24 Jun 2012 00:04:49 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 6B6168FC16 for ; Sun, 24 Jun 2012 00:04:49 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q5O04l7a022204; Sun, 24 Jun 2012 00:04:47 GMT (envelope-from kientzle@freebsd.org) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id rjhicqke4kzqrzx8zirgveu64n; Sun, 24 Jun 2012 00:04:47 +0000 (UTC) (envelope-from kientzle@freebsd.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <9204F891-C26B-4BED-9866-B31281521683@bsdimp.com> Date: Sat, 23 Jun 2012 17:04:45 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <1B8D4502-00FF-4836-9055-FDE4F0E1483F@freebsd.org> References: <3F1A5B5F-0787-41CE-8C77-8B1F9A601172@freebsd.org> <31C8D224-72D4-4BE8-8EC3-29B078C7DAC3@bsdimp.com> <0078302D-CC33-4B89-87BE-50C77D4855BE@freebsd.org> <9204F891-C26B-4BED-9866-B31281521683@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1278) Cc: arm@freebsd.org Subject: Re: armv6 tree vs. buildkernel X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2012 00:04:49 -0000 On Jun 23, 2012, at 3:17 PM, Warner Losh wrote: >=20 > On Jun 23, 2012, at 3:07 PM, Tim Kientzle wrote: >=20 >> On Jun 23, 2012, at 12:58 PM, Warner Losh wrote: >>>=20 >>> On Jun 23, 2012, at 12:58 PM, Tim Kientzle wrote: >>>> On Jun 23, 2012, at 7:35 AM, Warner Losh wrote: >>>>>=20 >>>>>> P.S. How is CPUTYPE/TARGET_CPUTYPE supposed to be inferred for = regular "buildworld"? >>>>>> The only option I can find is to set it explicitly in = /etc/src.conf >>>>>=20 >>>>> It can't possibly work very well. We need to get = TARGET_ARCH=3Darmv6 working instead of continuing these kludges. >>>>=20 >>>>=20 >>>> Help get me oriented and I'll start grinding through this. >>>>=20 >>>> What values of TARGET_ARCH should be supported? >>>=20 >>> arm, armeb, armv6 (and maybe armv6eb if they make those). >>=20 >> So do you consider the -DARM_ARCH_6 and -D_ARM_ARCH_6 >> defines to be among these "kluges"? >=20 > Yes. The compilers built when we're doing armv6 should have them = defined. I believe they are standard. If not, we should migrate tot he = standard defines. There was some churn in Mips land because of this = (some of which I fixed, some of which I caused :). Ah, yes. Of course. That's the other piece I was missing. I found a list of the standard defines for GCC; I'll compare this to the = current headers and see if I can fix up any mismatches. At a cursory glance, it = looks like we're pretty close already. BTW, I like the way the Chromium folks handled these: http://www.mail-archive.com/v8-dev@googlegroups.com/msg11102.html That's a lot clearer than the _ARM_ARCH_6, etc, that we're currently defining (apparently for the same purpose) in sys/arm/includes/asm.h. The current xdev arm/arm GCC seems to default to ARMv4: $ arm-freebsd-gcc -E -dM /tmp/foo.h | grep -i arm #define __ARMEL__ 1 #define __ARM_ARCH_4__ 1 #define __arm__ 1 I'll try your patches; I presume they support an arm/armv6 xdev that = defaults to ARMv6. >> So if someone wants an armv7 tree, they should have >> TARGET=3Darm >> TARGET_ARCH=3Darmv6 >> TARGET_CPUTYPE=3Darmv7 >=20 > Correct. This is much the same as if someone wants a nahalem tree on = x86: >=20 > TARGET=3Di386 > TARGET_ARCH=3Di386 > TARGET_CPUTYPE=3Dnahalem Thanks. That clarifies a lot. What is the relation between our ARCH and CPUTYPE and GCC's -march and = -mcpu options? Based on the above, it looks like our ARM CPUTYPE should = map to GCC's -march: http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html Tim