On Tue, 2007-10-02 at 07:59 +0200, Avi Kivity wrote:
> Jerone Young wrote:
> > This is the first of many patches to begin to make kvm source a lot
> > better for compiling for other architecture support (that is not x86 or
> > x86-64).
> >
> > This patch makes it possible so that someone on an x86 machine can cross
> > compile for an x86-64 machine and vice versa. So now you will have
> > config-$(arch).mak for each architecture, with specific architecture
> > rules. 
> >
> > An example of this is for compiling x86-64 on an x86 machine is:
> > make KERNELDIR=~/tmp/kvm ARCH=x86_64
> >   
> 
> This should be done via ./configure (I dislike ?= intensely).

This is something that could be done via the ./configure script. What
will need to add is ARCH=, CC=, LD= as variables as well. 

I can create a patch for this.


> 
> > This allows for someone with an x86 machine to compile for x86_64. Later
> > patches that I will be submitting will be for ppc and will make a few
> > more changes.
> >
> > What I would like though is comments on how everyone feels about this
> > approach. We are need of something like this to start ading ppc related
> > code.
> >
> >   
> 
> No problem for user/.  I'd like to see this accepted by qemu-devel as well.

Well qemu pretty much has this problem taken care of. In qemu you can
just use the autoconf system. So for our purposes with PPC development
we need to compile the binaries on an x86 machine (as the embedded
boards are of course much slower, then our super x86 machines). So you
just launch configure in qemu with the options:

./configure \
        --cpu=powerpc \
        --cross-prefix=powerpc-440-linux-gnu-

This will compile qemu for the target CPU powerpc and will use cross
compile tools with prefix "powerpc-440-linux-gnu-" that are in our PATH.
So we have for example powerpc-440-linux-gnu-gcc which is used to
compile the proper ppc binary.

All in all these patches whouldn't be needed in qemu because it already
has this problem taken care of. But the test case directory /user do not
have this problem taken care of. It assumes that you will run on the
machine that you are compiling on.

> 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to