From owner-freebsd-embedded@FreeBSD.ORG Mon Jun 15 17:31:21 2015 Return-Path: Delivered-To: embedded@hub.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 197FF330 for ; Mon, 15 Jun 2015 17:31:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ig0-f169.google.com (mail-ig0-f169.google.com [209.85.213.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5668D39 for ; Mon, 15 Jun 2015 17:31:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by igbos3 with SMTP id os3so24527938igb.0 for ; Mon, 15 Jun 2015 10:31:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=/NoEjnc9aFLUKhEoTnf1qvDnIa180WuflRH/QjtH4nk=; b=ds5OoptGFT/YmfUZpbB40xUM6auf3FcfZfT+unqH+tobWeZiuwl0KjNboyOWK6oynY rWP0AXAwb5W4ZgBGlvVVlG5WLZtt3TndHH3zUgu9UaGlsrKyE2zvycLM/HTNlSFKBCLv NmScp/96hli85ucIpGOK1bAs9Gzkojs0wTBQbdRlFw9cH2/BjSukoIox8GzMjWTQAUeo SjdwfOJq0eycJHgOPDbHiNi0Y7Bity8SORKgucLVAWA1fhz1uzzO8jeSGxqEG2Yyuch6 w1/3M93DKxLc+0usJQnuBMmZkgfYDYKNResmLej25/NteXolgTMNXSFnvJKXTorEHVUm BtPA== X-Gm-Message-State: ALoCoQnRsMYFLUwjMNfQRwEVnZPbvzRt0SvMwjnqNgMN+NbhYYVbJdCrr9TTn8GI6IcDKPV/ZSHD X-Received: by 10.107.136.88 with SMTP id k85mr10570035iod.63.1434389480227; Mon, 15 Jun 2015 10:31:20 -0700 (PDT) Received: from netflix-mac-wired.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id y124sm9260891iod.13.2015.06.15.10.31.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Jun 2015 10:31:19 -0700 (PDT) Sender: Warner Losh Subject: Re: Starting to cross-compile non-base software for MIPS - what it's like Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_A5074BF4-BC88-4BF3-9445-7A318F88F910"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: Date: Mon, 15 Jun 2015 11:31:17 -0600 Cc: "freebsd-embedded@freebsd.org" , "freebsd-mips@freebsd.org" Message-Id: <2ADF0848-4190-4D40-808B-DA6D539FA431@bsdimp.com> References: To: Adrian Chadd X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2015 17:31:21 -0000 --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 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--