Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Aug 2017 17:40:09 +0200
From:      Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
To:        Andrea Venturoli <ml@netfence.it>
Cc:        Jan Beich <jbeich@freebsd.org>, freebsd-ports@freebsd.org
Subject:   Re: qemu-aarch64-static
Message-ID:  <CAB88xy8GdOHti5H6Aq1uzLjqka9EVg5H8pFBhL9UVSyJ0FX2Ag@mail.gmail.com>
In-Reply-To: <db3b26b9-fca9-3ce9-7e33-6cc16452e51b@netfence.it>
References:  <29906b14-8efa-ba65-985a-fd5b90c76b9b@netfence.it> <fucq-0zjk-wny@FreeBSD.org> <cc27572c-22c8-f5b2-6c2d-e563751d6423@netfence.it> <CAB88xy_bvpRRsBHOW6hg13RTACHkc9juMrjEBMW7NRunw_UExg@mail.gmail.com> <db3b26b9-fca9-3ce9-7e33-6cc16452e51b@netfence.it>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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 <ml@netfence.it> 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.



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CAB88xy8GdOHti5H6Aq1uzLjqka9EVg5H8pFBhL9UVSyJ0FX2Ag>