Building MinGW32 Qemu on Linux (or anything else I guess)

So as always it’s the glibc2 wars.  And as part of the fun you need pkg-config.  And since it has to run, you’ll end up with the native version.

Luckily I found this site, mega-nerd.com

So you can create a i586-mingw32msvc-pkg-config file.  Just in case it get's lost here it is:

#!/bin/bash

# This file has no copyright assigned and is placed in the Public Domain.
# No warranty is given.

# When using the mingw32msvc cross compiler tools, the native Linux
# pkg-config executable works fine as long as the default PKG_CONFIG_LIBDIR
# is overridden.
export PKG_CONFIG_LIBDIR=/usr/i586-mingw32msvc/lib/pkgconfig

# Also want to override the standard user defined PKG_CONFIG_PATH with
# a mingw32msvc specific one.
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH_MINGW32MSVC

# Now just execute pkg-config with the given command line args.
pkg-config $@

Fun as always, right?

And as always Qemu can be configured with:

configure --cross-prefix=i586-mingw32msvc-

When cross compiling.

This entry was posted in cross compiler, mingw, qemu by neozeed. Bookmark the permalink.
avatar

About neozeed

What is there to tell? I've loved UNIX like things since I was first exposed to QNX in highschool (we had the Unisys ICONS!), and spent the better time of my teenage years trying to get my own UNIX... I should have bought Coherent in retrospect.. Anyways latched onto Linux in 1992, and then got some old BSD admin books and have been hooked on the VAX BSD & other big/ancient things since...!

4 thoughts on “Building MinGW32 Qemu on Linux (or anything else I guess)

  1. I can’t remember what month and year, but there’s an issue of Linux Journal which describes the problems of cross-compiling, that is making a Linux program work via building it on Cygwin, say, and then confirming it works on a Fedora platform, say.

    You might search through their lists of articles of the years.

    • i got it to work. The configure script didnt find some stuff, and screwed up a bunch more. I hate make systems that hide from the user what they are doing, because we are all dumb end users.

      But after seeing what nonsense the compiler and linker were being fed, i have an exe that booted MS-DOS… it needs a bit more help, i bet the adlib is still disabled.

    • Lucky you, I’ve had nothing but issues with those builds… I’ve suspected because they dont follow release milestones, but a given time period.

      QEMU is a nightmare to build for windows.

Leave a Reply

Your email address will not be published.

Notify me of followup comments via e-mail. You can also subscribe without commenting.