Date: Wed, 1 Apr 2015 20:17:48 -0700 From: Mark Millard <markmi@dsl-only.net> To: Warner Losh <imp@bsdimp.com> Cc: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: Re: Shorter report: powerpc64-xtoolchain-gcc use fails from powerpc (non-64) Message-ID: <D7A0BB9E-1FCA-4D33-8C41-B4E915A8B3E6@dsl-only.net> In-Reply-To: <83AB15DC-4B96-489D-A74B-84A552050785@bsdimp.com> References: <BB07709E-A5D3-458A-8ED7-61E64103A43C@dsl-only.net> <B49E8B91-B8C2-4F0C-9662-8814C16041A4@bsdimp.com> <7AF12D5F-F4A0-429E-AEAE-4AEF2D35FE31@dsl-only.net> <83AB15DC-4B96-489D-A74B-84A552050785@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[I've omitted history going in a different direction than this note.] On 2015-Apr-1, at 02:49 PM, Warner Losh <imp at bsdimp.com> wrote: >=20 > On Apr 1, 2015, at 4:37 PM, Mark Millard <markmi@dsl-only.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D7A0BB9E-1FCA-4D33-8C41-B4E915A8B3E6>