Re: Fedora and Cross Compiling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oliver Falk wrote:
> On 06/08/2007 09:56 PM, Brendan Conoboy wrote:
> [ ... ]
>>> The build system must be enhanced to support cross compilation.
>> This is a really interesting (to me) extension of the build system
>> requiring enhancements in many areas.
>>
>> First, there are primitives in Koji that need to be built up such that,
>> for instance, x86 knows it can cross build arm tools.
> 
> To make koji believe it can build arm on x86 should be no problem. But
> how to tell koji to don't do the %test's. We need to do this on rpm level...
> 
>> Second, the x86 host needs to be able to retrieve and install arm
>> dependencies in the arm sys-root (arm's glibc, arm's libX11-devel, etc).
> 
> Now we need to touch yum... I'm sure Seth can hack up that bit of code.
> :-) Also mock needs to understand it.


We use mock and yum in our current cross build environment (I'm in
Brendan's group as well). Mock doesn't really care what's going on in
the chroot, it just installs package dependencies and periodically runs
commands in the chroot. So, if you have a repository with cross tool
binary RPMs in it, mock will happily use yum to fetch them, install them
into your chroot and will run them in the chroot. I did add an option to
mock (the --installdeps option) that will just pull the build
depdendencies from an RPM and have yum install them into a chroot, but
that's the only thing that's really cross-specific in mock. Haven't
really had to do anything to yum.

We do have some ugly hackery in our tools that use mock/yum though. We
override the RPM macros and rpmrc files, in an attempt to use the
out-of-the-box specfile while overriding the compiler, linker,
assembler, etc. The intent is to put together a chroot that contains
cross tools, then run rpmbuild on a specfile in the chroot so that the
outtput is a binary RPM targeted for the desired architecture (armv5l,
mips32, etc.). Unfortunately not many specfiles work out-of-the-box.

I'll see if I can put together a (somewhat) coherent description of how
we build and install cross RPMS. Not sure it'll be all that useful for
Fedora, but it might stimulate a discussion that gets us there.

Clark

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGbdJxHyuj/+TTEp0RApRGAKDf2AN8wbLH4D1XJsLdzoyLBmdmQwCghisq
vFCAIROepedxEoadk6eDT68=
=Z1DR
-----END PGP SIGNATURE-----

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux