Re: Creating debs using a cross-build environment?
2012/2/23 Svante Signell <email@example.com>:
> On Thu, 2012-02-23 at 13:00 +0100, Hector Oron wrote:
>> 2012/2/23 Jonathan Nieder <firstname.lastname@example.org>:
>> Most underlying mechanisms assume Linux kernel, AFAICT, none has
>> attempted to change those to use another kernel, but that might be
>> possible changing Linux kernel headers by some other kernel headers.
> I've looked at this web page (and several other guides and web pages).
> The Debian web page does not help much in creating a cross compiler for
> another kernel than GNU/Linux. These steps I already have done and
> written down for the GNU/Hurd OS. Anybody interested?
Just for fun, I'd be curious to see.
> My questions and aims are:
> Assuming the cross and target build environment is available, as above.
Note: While it is possible to build SYSROOT cross-tools, it is not in
Debian cross defaults.
> Current method:
> apt-get source package
> mkdir build-package
> cd build-package
> ../package/configure --build=$BUILD --host=$HOST (+ other options)
> make all
> make install
> No .deb package is created, all headers, libraries and executables are
> directly installed in $SYSROOT.
Not sure, what you mean? What is 'package'? Are you trying to populate $SYSROOT?
You might be able to do that from binary packages, using debootstrap
> With cross-build dpkg-support:
> Set up where the cross tools and target headers, libraries and
> executables are located.
> cd package
> DEB_BUILD_GNU_TYPE=$BUILD DEB_HOST_GNU_TYPE=$TARGET dpkg-buildpackage -b
> That will create .debs to be installed on the target box or in $SYSROOT.
Actually, not all packages support cross compilation, you might need
to check, proper way would be by setting -a$ARCH flag. So,
dpkg-buildpackage -b -ahurd-i386 (+extra flags)
> The gnat issue is related but separate from the above description. For
> gnat we have a chicken-and-egg situation (as often is the case with
Héctor Orón -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-.