From owner-freebsd-toolchain@FreeBSD.ORG Thu Apr 2 03:17:58 2015 Return-Path: Delivered-To: freebsd-toolchain@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 46C44BEE for ; Thu, 2 Apr 2015 03:17:58 +0000 (UTC) Received: from asp.reflexion.net (outbound-242.asp.reflexion.net [69.84.129.242]) (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 DDD6487A for ; Thu, 2 Apr 2015 03:17:57 +0000 (UTC) Received: (qmail 20536 invoked from network); 2 Apr 2015 03:17:50 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 2 Apr 2015 03:17:50 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v7.40.1) with SMTP; Wed, 01 Apr 2015 23:17:50 -0400 (EDT) Received: (qmail 5577 invoked from network); 2 Apr 2015 03:17:50 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (DHE-RSA-AES256-SHA encrypted) SMTP; 2 Apr 2015 03:17:50 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-67-189-19-145.hsd1.or.comcast.net [67.189.19.145]) by iron2.pdx.net (Postfix) with ESMTPSA id AEE2C1C4052; Wed, 1 Apr 2015 20:17:43 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: Shorter report: powerpc64-xtoolchain-gcc use fails from powerpc (non-64) From: Mark Millard In-Reply-To: <83AB15DC-4B96-489D-A74B-84A552050785@bsdimp.com> Date: Wed, 1 Apr 2015 20:17:48 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <7AF12D5F-F4A0-429E-AEAE-4AEF2D35FE31@dsl-only.net> <83AB15DC-4B96-489D-A74B-84A552050785@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.2070.6) Cc: FreeBSD Toolchain , FreeBSD PowerPC ML X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2015 03:17:58 -0000 [I've omitted history going in a different direction than this note.] On 2015-Apr-1, at 02:49 PM, Warner Losh wrote: >=20 > On Apr 1, 2015, at 4:37 PM, Mark Millard wrote: >=20 >> =46rom a powerpc (non-64) 11.0-CURRENT boot is the following supposed = to work by producing a powerpc64 appropriate result (no CROSS_TOOLCHAIN = for this question)? >>=20 >> make buildworld buildkernel KERNCONF=3DGENERIC64 TARGET=3Dpowerpc = TARGET_ARCH=3Dpowerpc64 >=20 > This should work, modulo broken compilers. >=20 >> The standard v4.2.1 /usr/bin/gcc in a powerpc context (non-64) for = that make command would produce files for TARGET_ARCH=3Dpowerpc unless = the command lines specified otherwise. >=20 > Ah, so it is a =E2=80=98cross build=E2=80=99 situation... >=20 >> Notably the build environment is picking powerpc64 specific paths = when appropriate, such as: >>=20 >> lib/csu/powerpc64/Makefile >>=20 >> so that specific Makefile is not likely to be used when powerpc64 = handling is inappropriate, even executed from from a powerpc (non-64) = context. A different path (and so a distinct Makefile) would be used for = KERNCONF=3DGENERIC TARGET_ARCH=3Dpowerpc . After some experimentation I think that I've learned that I'd not = guessed the existence of a required step to enable "make buildkernel = KERNCONF=3DGENERIC64 TARGET=3Dpowerpc TARGET_ARCH=3Dpowerpc64" from = powerpc: one first must do a... make kernel-toolchain KERNCONF=3DGENERIC64 TARGET=3Dpowerpc = TARGET_ARCH=3Dpowerpc64 before trying buildkernel. Similarly if buildworld is going to be done = then make toolchain KERNCONF=3DGENERIC64 TARGET=3Dpowerpc = TARGET_ARCH=3Dpowerpc64 should be done first. These put in place a tailored gcc 4.2.1 build into the appropriate part = of the /usr/obj/... tree and once it exists the path used during make = picks up the sub-tree-specific gcc 4.2.1. The defaults for this tree-specific gcc do not require command line = options to specify the default context for the special TARGET_ARCH. Similarly for building for powerpc from powerpc64. =3D=3D=3D Mark Millard markmi at dsl-only.net