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

[PATCH 0/3] mock cvs 2007-03: cross-compiling



The first patch that follows adds cross-compilation support based on
the model of a "target filesystem" containing target libraries and
headers and a "cross filesystem" (or cross root) containing
cross-compilers for the target.  Examples of a mock cfg that uses this
is in the third patch.

The second patch adds SUBDIRS to the Make 'distclean' targets.  This
patch can be applied independently of the other two.

The third patch is a 'contrib' of DENX ELDK 4.0 and 4.1 support as an
example and is what I used to test the first patch.

== What these are ==

I've been working with Wind River Linux, MontaVista, TimeSys,
FreeScale LTIB, and DENX ELDK.  Most contain their own implementation
of 'rpmbuild' (like tsrpm and mvlrpm) and most can also be used with
'rpmbuild' with appropriate macros.  In all cases the pattern is to
have a "target filesystem" (I use /target in the mock chroot) with
target libraries and headers and set CPPFLAGS, LDFLAGS, and others
appropriately, and a "cross filesystem" or "cross root" (I use /cross
in the chroot) where the host cross-compilers get installed, added to
PATH, and supplied through CC and CXX.  There are occasional gotchas
with host includes, libraries, libtool, and pkg-config.

The mock root (-r) config specifies the host build config and a new
option --toolkit gives the toolkit to build with, which corresponds to
a new mock configuration file with the target and cross filesystem
info and any special build options.  The goal is for toolkit configs
to be reused with several chroots and different toolkits to be used to
build for different cross distributions.

I used DENX ELDK to initially develop these patches because anyone can
download that toolkit without registration or evaluation license to
work with the patches.

These mock patches require a patch to yum to support installing an
architecture unrelated to the host (the target yum conf specifies the
arch of the target fs).  The yum patch is to yum 2.4.3 from CentOS4
since our build system is RHEL4.
  https://lists.dulug.duke.edu/pipermail/yum-devel/2007-June/003849.html

I haven't had a chance to update these patches to current CVS, I'm
posting them now in case they're useful with the current interest in
cross-compiling on fedora-devel.

  -- Ken


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