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

Re: Building i386 as target on amd64



On Tue, 8 Jan 2008 22:10:44 +0300
"Max Dmitrichenko" <dmitrmax.subscription@gmail.com> wrote:

> > > > Use debootstrap to create an i386 chroot on your amd64 box. You do not
> > > > need a cross compiler or toolchain.
> > >
> > > debootstrap from what mirror?
> >
> > From a normal Debian mirror. The chroot is a build chroot using normal
> > Debian packages, into which you download the packages to be built.
> 
> Oh! Now I've got you.

:-)

> > Waste of time - you don't need a toolchain for what you want. You are
> > not cross compiling. Build an i386 chroot and build normally.
> 
> Ok. I'll try this way. BTW, is there any automated tool which can
> build the Emdebian repository with your patches taken from SVN? Or the
> sources at buildd.emdebian.org/emdebian have already the patches
> applied and I can use something like pbuilder?

Not really. Some simple scripting with 'patch' is probably what you
need. The bulk of emdebian-tools is very biased towards cross-building
- you don't want to be using the scripts themselves but feel free to
take sections of the code related to applying the patches.

Packages that use cache files will have an
'emdebian-arm-linux-gnu.cache.patch' file which you need to ignore -
for those packages you will also have to *amend* the Emdebian patches
because the patch to debian/rules is expecting to find the cache file
but you don't want the values from the cache, you want the native
values obtained by ./configure in the i386 environment.

You're building native packages - you won't be using cross-build
dependencies, you won't be using apt-cross or dpkg-cross. You won't be
using components of the patches that are wrapped in cross-build
detection (tests for DEB_HOST_GNU_TYPE != DEB_BUILD_GNU_TYPE) because
build == host inside the chroot (you may even have to reimplement some
of those).

There is no simple way of doing this, Max. It'll be a lot of work. It's
taken over a year to get the current patch set for ARM. A lot of the
changes in the patches are cross-compiling-specific - you will have to
reassess these patches and what they do and make a judgement about
whether these are suitable for your needs. This is no 'cut-and-paste'
operation.

It would actually be somewhat easier if you were cross building for
mips or something - you'd only have to adapt the cache files.

I've been concentrating only on ARM and cross building - there's
room in the emdebian-tools package for a set of scripts geared towards
native builds using the principles in the patches, if you get the time.
Then I can look at extending the Emdebian::Tools package to include
better support of not just my kind of builds.

-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpteFqoapvir.pgp
Description: PGP signature


Reply to: