From owner-freebsd-embedded@FreeBSD.ORG Mon Jun 15 18:39:37 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 602DDC15; Mon, 15 Jun 2015 18:39:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (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 26AF1F1B; Mon, 15 Jun 2015 18:39:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igboe5 with SMTP id oe5so37187874igb.1; Mon, 15 Jun 2015 11:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=KAUTJecYVNsPyEp1Xg5TZox86rwan6+wnMLNwutKGMQ=; b=NzvKfjLUD+PUuzyoqVGi5VubOU5Dc2hX4iVCknzzkyFShjo/GZL1ieJH9Aru8+vPIu 1xeV0pdm1ecdNMzHamyI1kdokBiW84DFQxhFxBQRjV4PUR+2gartJ3xwKuhf9xmJGgZT eG4hI8Z7R6DYuboocA4UMyTLnQ7h1uGfkqGWUof3Cwf1TajhXoKm4uB7/54W/xpXLA+f X4gj4UQR8Qqa5honW59cATLGC6rbRwIyoO2lfGggzutzBn2sKEZQd3r1ZNGDJeX9mLzj lujU2qQxtwOdk65Q938c+MGY/1AzcomWTXSyxXAS8hqKgFyGOhguK2c4FiAz329keOFy SHPQ== MIME-Version: 1.0 X-Received: by 10.107.5.210 with SMTP id 201mr35708374iof.88.1434393576009; Mon, 15 Jun 2015 11:39:36 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Mon, 15 Jun 2015 11:39:35 -0700 (PDT) In-Reply-To: <2ADF0848-4190-4D40-808B-DA6D539FA431@bsdimp.com> References: <2ADF0848-4190-4D40-808B-DA6D539FA431@bsdimp.com> Date: Mon, 15 Jun 2015 11:39:35 -0700 X-Google-Sender-Auth: 3xRmu-j0EPUYLUWFPcTzr2qILms Message-ID: Subject: Re: Starting to cross-compile non-base software for MIPS - what it's like From: Adrian Chadd To: Warner Losh Cc: "freebsd-embedded@freebsd.org" , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 18:39:37 -0000 On 15 June 2015 at 10:31, Warner Losh wrote: > >> On Jun 15, 2015, at 12:21 AM, Adrian Chadd 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