From: Andrew Jones <ajones@ventanamicro.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com,
palmer@dabbelt.com, bin.meng@windriver.com,
peter.maydell@linaro.org,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH v2] docs/devel: Add cross-compiling doc
Date: Thu, 7 Sep 2023 14:36:29 +0200 [thread overview]
Message-ID: <20230907-d272560607f40c00538e4e3f@orel> (raw)
In-Reply-To: <20230907-6262b40a0a352bdce53999e3@orel>
On Thu, Sep 07, 2023 at 02:31:20PM +0200, Andrew Jones wrote:
> On Thu, Sep 07, 2023 at 11:20:55AM +0100, Alex Bennée wrote:
> >
> > Andrew Jones <ajones@ventanamicro.com> writes:
> >
> > > Add instructions for how to cross-compile QEMU for RISC-V. The
> > > file is named generically because there's no reason not to collect
> > > other architectures steps into the same file, especially because
> > > several subsections like those for cross-compiling QEMU dependencies
> > > using meson and a cross-file could be shared. Additionally, other
> > > approaches to creating sysroots, such as with debootstrap, may be
> > > documented in this file in the future.
> > >
> > > Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
> > > ---
> > > docs/devel/cross-compiling.rst | 221 +++++++++++++++++++++++++++++++++
> > > docs/devel/index-build.rst | 1 +
> > > 2 files changed, 222 insertions(+)
> > > create mode 100644 docs/devel/cross-compiling.rst
> > >
> > > diff --git a/docs/devel/cross-compiling.rst b/docs/devel/cross-compiling.rst
> > > new file mode 100644
> > > index 000000000000..1b988ba54e4c
> > > --- /dev/null
> > > +++ b/docs/devel/cross-compiling.rst
> > > @@ -0,0 +1,221 @@
> > > +.. SPDX-License-Identifier: GPL-2.0-or-later
> > > +
> > > +====================
> > > +Cross-compiling QEMU
> > > +====================
> > > +
> > > +Cross-compiling QEMU first requires the preparation of a cross-toolchain
> > > +and the cross-compiling of QEMU's dependencies. While the steps will be
> > > +similar across architectures, each architecture will have its own specific
> > > +recommendations.
> >
> > "some architectures" - most of the cross compile stuff is hidden away by
> > the build system on systems with appropriate development libraries
> > installed. I think we would be remiss if we didn't just outline the
> > common case:
> >
> > ../configure --cross-prefix=riscv64-linux-gnu-
> >
> > I think we could make it clearer that in most cases you don't need to
> > prepare and cross-compile a bunch of dependencies lest we send
> > developers down a rabbit hole.
> >
> > Maybe build-system.rst be updated and this reference it for the common
> > case?
> >
>
> Hi Alex,
>
> tl;dr, I'd welcome instructions helping people get cross-arch development
> libraries installed without having to build them. I wouldn't make a good
> author for those instructions, though, since I don't know how.
>
> I'm guessing the dependencies can be installed with a distro's package
> management, assuming the package management supports cross-arch
> installation and installing to a specified root directory. I'm on Fedora,
> so I just tried
>
> $ sudo dnf install --forcearch=aarch64 --installroot=$SYSROOT --releasever=36 glib2-devel
>
> but it wanted to install a huge number of packages, which most people
> probably wouldn't want to do. Maybe that command isn't what you had in
> mind or other distros can manage this better. I'm all ears.
>
Ah, I just saw your other reply on the original posting. The magic is in
docker stuff.
I'll look into it, but I'd also make a poor author for anything regarding
docker :-)
Thanks,
drew
next prev parent reply other threads:[~2023-09-07 12:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 8:46 [PATCH v2] docs/devel: Add cross-compiling doc Andrew Jones
2023-09-07 10:20 ` Alex Bennée
2023-09-07 12:31 ` Andrew Jones
2023-09-07 12:36 ` Andrew Jones [this message]
2023-09-10 10:33 ` Daniel Henrique Barboza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230907-d272560607f40c00538e4e3f@orel \
--to=ajones@ventanamicro.com \
--cc=alex.bennee@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=dbarboza@ventanamicro.com \
--cc=palmer@dabbelt.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).