qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] Configure Qemu-PPC for i386 target?


From: G 3
Subject: Re: [Qemu-ppc] Configure Qemu-PPC for i386 target?
Date: Tue, 21 Feb 2017 16:37:37 -0500


On Feb 21, 2017, at 10:02 AM, Jd Lyons wrote:


On Feb 20, 2017, at 10:23 AM, G 3 <address@hidden> wrote:


On Feb 20, 2017, at 7:39 AM, address@hidden wrote:

What it the proper way to configure Qemu to make i386 target binaries?

I see what you want to do. The subject was a little confusing. You would do this:

./configure --target-list=i386-softmmu

You could also do this:

./configure --target-list=ppc-softmmu,i386-softmmu
No, I want to compile ppc-softmmu as a 32bit binary, not build it as a 64bit binary. The problem is I have a my versions of pkg- config seems that it doesn’t support building for 32bit binaries.

Are you able to make a 32 bit binary at all?

https://www.cyberciti.biz/tips/compile-32bit-application-using-gcc-64- bit-linux.html From this page it states how to make some simple 32 and 64 bit applications.

Try making a file called hello.c that is just a simple "hello world" type of application. Then try these commands:

$ gcc -m32 -o output32 hello.c

$ gcc -m64 -o output64 hello.c

Did it work? Try using the file command to check.

$ file output32
output32: Mach-O executable ppc

When I tried the -m64 option, I saw this error message on my system:
/usr/local/Cellar/cctools/806/bin/ld: does not support 64-bit architecture

This is probably because I am using an old version of cctools.


CFLAGS='-arch i386' LDFLAGS='-arch i386' CXXFLAGS='-arch i386 ' ../ qemu/configure
C++ compiler c++ does not work with C compiler cc
Disabling C++ specific optional code

ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
       You probably need to set PKG_CONFIG_LIBDIR
       to point to the right pkg-config files for your
       build target

I can’t seem to find any info on how to set pkg-config to compile for i386?

You might have to rebuild pkg-config for 32 bit support. The homebrew package manager might be of help to you here. It will deal with all the dependencies for you.


The code I borrowed from PCem will only build as i386 target on OS X, so I was hoping that was the trouble I was having.

Does PCem build on x86-64? If it does then maybe the architecture of your host processor isn't the problem.


make: *** [subdir-ppc64-softmmu] Error 2

I?m not sure if it?s an issue where I need to build my code changes to be i386, but I?m trying to pin down the problem.

Most likely these are functions or variables that are not defined in QEMU. Maybe you are missing a header file.


I included all the header files the PCem called for to build this code, otherwise it would not make, it would tell me that something was undefined before it built the via-pci.o. I wish that were the problem, because it would tell me where to look for these undefined symbols, right now I’m at a loss, and the only thing I can figure is I must need to build for an i386 target.


I suggest contacting the people involved with PCem. Their experience might include this very problem.


reply via email to

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