bug-hurd
[Top][All Lists]
Advanced

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

Re: cross compilation problems


From: Steve Bowman
Subject: Re: cross compilation problems
Date: Tue, 24 Oct 2000 22:57:03 -0700
User-agent: Mutt/1.2.5i

On Wed, Oct 25, 2000 at 12:02:50AM -0500, Daniel E . Baumann wrote:
> > It is perfectly fine to cross-compile the hurd, and it should work fine.
> > It looks like his cross-compiler was not set up right.
> 
> I just installed the debian package. What else needs to be done?

Well, since I haven't done it yet, I'd have to guess.  First of all,
there are two ways to build, with or without the debian/rules makefile.

With it, a native build looks like:

    dpkg-buildpackage -uc -us

and from comments in an unrelated message, I gather a cross-build would
look like:

    dpkg-buildpackage -uc -us -ahurd-i386

but I don't know if that takes care of everything for you.  That is, do
you also need to set some env such as CC=i386-gnu-gcc or MIG=i386-gnu-mig?
You'd have to try it or read the dpkg-buildpackage script.  This would
build a debian package for you (two actually, hurd and hurd-dev).

Without the debian/rules makefile, I haven't done that with hurd, but
for gnumach it looks like (my own configuration):

mkdir build; cd build           #  to build in a separate subdir
MIG=i386-gnu-mig CC=i386-gnu-gcc ../configure \
        --prefix=/gnu \
        --enable-com \
        --enable-floppy \
        --enable-ide \
        --enable-kmsg \
        --enable-lpr \
        --enable-viarhine \
        i386-pc-gnu
make
make install

Comparing that to what you said you were doing earlier in the thread,
and assuming that cross-building hurd is very similar to cross-building
gnumach, the differences I see are:

    - you may not need LD=
    - you may need MIG=
    - one or both of --build and --host may be wrong or superfluous
    - [ --target ] i386-pc-gnu should be added

Also, for cross-compiling gnumach, you need gcc-i386-gnu, mig-i386-gnu,
and dpkg-cross (maybe only if you use dpkg-buildpackage).  You may want
to make sure they're all there.  This method would not build a debian
package for you, you'll have to work outside the package manager.

Take your pick, try a few combinations and you should hit on one that
works.

HTH and good luck,
Steve

-- 
Steve Bowman  <sbowman@frostwork.net> (preferred)
Buckeye, AZ   <sbowman@goodnet.com> <bowmanc@acm.org>
              <http://www.goodnet.com/~sbowman/>

Powered by Debian GNU/Linux and GNU/Hurd <http://www.debian.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]