Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jun 2015 11:31:17 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Adrian Chadd <adrian@freebsd.org>
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:  <2ADF0848-4190-4D40-808B-DA6D539FA431@bsdimp.com>
In-Reply-To: <CAJ-VmokS7ac7GHBSyajVJrenEa0s226xdrfAaDyPi4Rz=OfHXw@mail.gmail.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>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_A5074BF4-BC88-4BF3-9445-7A318F88F910
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8


> On Jun 15, 2015, at 12:21 AM, Adrian Chadd <adrian@freebsd.org> wrote:
>=20
> 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).
>=20
> 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. =46rom 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.

> There's no compiler built with it though, so until I cross compile a
> compiler package (and cross-compile pkg, grr) getting a compiler
> /into/ the image is going to take some time.

gcc does support the notion of building on host X to generate binaries
that run on host Y that generate code for host Z. But that might be a
bit of a stretch for our system.

> But, it does boot and run fine, and cross-compiled binaries (eg
> dropbear client/server) work fine, as well as crunchgen binaries
> (rescue, bsdbox.)

That=E2=80=99s cool!

Warner



--Apple-Mail=_A5074BF4-BC88-4BF3-9445-7A318F88F910
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJVfwvlAAoJEGwc0Sh9sBEAqX8P/32M9k39Ixiq1eq+6FIzgP/5
8DPaKn9XUXDlpdPsYlKTjLg51NfM57wZGySm9oWFxu95TSMf8iafcxLmdloWXxhZ
KKSyqnPcSLrYrsUP+pccjbNsUih6fK/Nc3pvYmNIDet/zNv0lbo7HwiSrNLPW8QK
I3flnXq+iThG8gFCno9dqCKBZIc3+HIt0+0SZZqO84z7Ct0uQOsQ4DwtqE3DNMPU
57b6CgnWSNrsXd6Ob6sQNe27WHogCS1nCQrzH0Fclkpe6xTF8k8lL6SARd0hP26M
zso54R3zp5kmUlLTTgXMyRHzEnWBEDh/vahSEKru2mPBJnlsfVIDcMFXoWtv/3FV
BDa0WlnmUudW35beuVw8CKrc4xLnHFn5WPXXp5Y+cjb8u62KTmUr1U9n8Nxba+2K
eYpqzwbkG4nAyyPMVXjcs7hkPeWaKzSg8QM26Vetk2uLQ5g/s3jYEPWxzt48HhoP
LGuBAT3PNMzzdYbvka6PL0CRlHTQh+XdcMuoVHVLMB+ULO4z2fWpP8GkGuQPuENP
JOTWabErI/oHo3aWWwwoejwdqdlTOa4J8b5a0VEeqinXhc4EeJkhV26Yv/LgWLdh
mcCqc5D+sxLlre9n3gEzYrgYzJYugyIvHJYAKMui0a3WooXjDosC+ee9YCPF3b8p
FQsuBZMNrzCSB1evqPXN
=5pqU
-----END PGP SIGNATURE-----

--Apple-Mail=_A5074BF4-BC88-4BF3-9445-7A318F88F910--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2ADF0848-4190-4D40-808B-DA6D539FA431>