From owner-freebsd-ports@freebsd.org Wed Aug 23 15:40:30 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE506DE9C7B for ; Wed, 23 Aug 2017 15:40:30 +0000 (UTC) (envelope-from luca.pizzamiglio@gmail.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (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 B73B874D36; Wed, 23 Aug 2017 15:40:30 +0000 (UTC) (envelope-from luca.pizzamiglio@gmail.com) Received: by mail-io0-x243.google.com with SMTP id g135so307382iog.0; Wed, 23 Aug 2017 08:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SwqGnf0bf94SSTHyxxsG4CDQQdJ5vXJeyHhw5YpdNCc=; b=XJfd8K4OXoKFhF4HXxjPvzZScDr8JD2xhUaMcMl5jeO/x882z/1RsWmULIozDIkbpc DWhsHaL+yYYGocejWfZB0yUkcY5TSg3UjHjS/DOH1uiXsk8ZeqFoZDhSuv4LLNuiHDFT yYAis8IoCGBcsEbfd6I8GnbDRhs2rZUJGOofUaVAKjyVGaAOd/4lQ1MFBiI7TTGmJXT8 IPmMrpdh0gfPznLeyMQUU805gqR+FpwAGM3V5rlOrYcOualBY7ZnNJACj3Xs9UXe0ybE 7YEWQ/rY7+j2MxndwlVTAJZYk9Eg1M1Qkx3D4IxcZ0HX9U62VWXbXHz7bzbGqiOUKmYw r8+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SwqGnf0bf94SSTHyxxsG4CDQQdJ5vXJeyHhw5YpdNCc=; b=Dj5PuMYXf4NdNB8UhAIlMLK0fpErzlnB6fnak8pQFcosImx+kH0YczCbsFxAhDLsIL +VqxD9RWq9wGOv0lpdMr3T/8vFBzCmxYHDpdCDUUqfrcn7tqyook+yn5pfYDFdFEFbwA rVnvY9JxqnZktpHvsnfOJf5WHG3Fod37nqDSvRsm1CZhDqL5AkMc4aoo+EhRzcxY0KCS QW/jUU2peKEpuU8Pz7YFYCdIo+0RObxt79ATK0fqaz16Zu/LUQV3WQOqdOfMkh5GJF3K xhuJSpBScyGReoTcm2wbcit+eOXHzcHovl0731eAgs4PQrAqzK3TypIHYrBesG0K5Bw6 Mbcg== X-Gm-Message-State: AHYfb5hFhVrlUNM27z4DO8VWoB2oMPQ0/rrFS6xZxN2gzzSSnnTti9Zr oxlCRnNUC8zPNhh7u38fiLWJ/UV6WWUw4GI= X-Received: by 10.107.11.217 with SMTP id 86mr2289748iol.303.1503502830108; Wed, 23 Aug 2017 08:40:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.5.130 with HTTP; Wed, 23 Aug 2017 08:40:09 -0700 (PDT) In-Reply-To: References: <29906b14-8efa-ba65-985a-fd5b90c76b9b@netfence.it> From: Luca Pizzamiglio Date: Wed, 23 Aug 2017 17:40:09 +0200 Message-ID: Subject: Re: qemu-aarch64-static To: Andrea Venturoli Cc: Jan Beich , freebsd-ports@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2017 15:40:31 -0000 If you want to cross-compile, you need * a proper toolchain * a project that's enable to produce cross-compiled binaries On Tue, Aug 22, 2017 at 8:04 PM, Andrea Venturoli wrote: > On 08/22/17 18:03, Luca Pizzamiglio wrote: >> >> yes, the qemu emulation of other architecture means that the CPU is >> emulated by software, that's really expensive. >> You should consider around 10x slower or even more. ccache can help a >> lot in this case. > > > Thanks. > So you are confirming my poudriere is running an ARM compiler to produce ARM > code? I've played with cross-compile in the past and that's my understanding. > > What's the use of "-x" when creating a jail then? > What role does the "native cross-toolchain" play? The FreeBSD jail is built using a cross-toolchain (fast) and it contains "cross-binaries" (in case of ARM, in the jail you will have a compiler which host and target are ARM) The packages are built inside a "cross-jail" (slow) The problem is that external ports often don't support cross-compile, so instead of modify tons of ports to add cross-tollchain support, poudriere/FreeBSD exploit features offered by binmisc/qemu to build binaries in a emulated environment. The big drawback is the speed. > I understood that would mean running an AMD64 compiler to cross-build ARM > code... and thought that its timings would be comparable to native building. > Is that wrong? > > bye & Thanks > av.