Date: Mon, 15 Jun 2015 11:39:35 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: "freebsd-embedded@freebsd.org" <embedded@freebsd.org>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: Starting to cross-compile non-base software for MIPS - what it's like Message-ID: <CAJ-Vmo=ce%2BRe7BQkDNV-ELnC-pFxfD8v4K-rPW4srUXfuewqpA@mail.gmail.com> In-Reply-To: <2ADF0848-4190-4D40-808B-DA6D539FA431@bsdimp.com> References: <CAJ-VmonSXYdLP_VpGh%2B3N_WfGwDLqWGcuPvOCf4VkOd0pJ5QWg@mail.gmail.com> <CAJ-Vmom%2BkGODRk8eT4LyFRnwTJd2AHwgrR6cbrB7hE6Z8Cx_Vw@mail.gmail.com> <CAJ-VmomYqmkZimzpXgxJK00vDhxK%2BqUdMSk%2BxXXiaZ_qdE6COQ@mail.gmail.com> <CAJ-VmokS7ac7GHBSyajVJrenEa0s226xdrfAaDyPi4Rz=OfHXw@mail.gmail.com> <2ADF0848-4190-4D40-808B-DA6D539FA431@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 15 June 2015 at 10:31, Warner Losh <imp@bsdimp.com> wrote: > >> On Jun 15, 2015, at 12:21 AM, Adrian Chadd <adrian@freebsd.org> wrote: >> >> So, for what it's worth - after the relevant hacks to convince the >> various stages to do their thing, I actually /do/ have a user/kernel >> cross-built from gcc-4.9.2 up on both the mips32 emulator (qemu) /and/ >> on real hardware (AR9331, MIPS24kc). >> >> The installworld fails because somehow the CROSS_TOOLCHAIN bits aren't >> being included right, so the compiler bits aren't set right. Here, >> COMPILER_TYPE=3Dgcc and COMPILER_VERSION=3D40902 - with this, MK_GCC is >> set to NO and the legacy c++ library isn't built. > > That=E2=80=99s actually correct. From about 4.8 and onward, clang and gcc= should > be using the same c++ runtime. Maybe our defaults are a bit messed up, > since libgcov likely shouldn=E2=80=99t be tied to MK_GCC at all=E2=80=A6 = With the clang introduction, > we=E2=80=99ve not always had a good clear line about the different subtle= aspects > of clang vs gcc, and this may be one of them. *nod* so,, I agree with all of that, but the above is the result, not the c= ause. make buildworld uses CROSS_TOOLCHAIN for the gcc config and cascades things correctly. make installworld doesn't seem to use CROSS_TOOLCHAIN everywhere, and it defaults to assuming we're building with gcc, and thus MK_GCC=3Dyes, and it tries installing non-built things. If I manually set the COMPILER_TYPE / COMPILER_VERSION variables then things work out. I /think/ that's broken behaviour, so I'm going to check first with bapt to see what's supposed to happen and see what we can do to sort that out. -a
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=ce%2BRe7BQkDNV-ELnC-pFxfD8v4K-rPW4srUXfuewqpA>