Hi list, I recently tried to build Qemu on Mac and ran into a couple of trivial issues that I've provided patches for. I suppose that normally people just use 'brew install qemu', but there is really no reason that it can't be built from source, particularly for those modifying Qemu regularly.
In any case, the first change moves to using 'libtool -static' to create libraries on Mac OS X. If one attempts to use ar and ranlib, then the final link will fail with error messages resembling the following: ld: warning: ignoring file libqemuutil.a, file was built for archive which is not the architecture being linked (x86_64): libqemuutil.a Undefined symbols for architecture x86_64: ... Notice ld (Apple's ld64) presumes the static library is a relocatable with architecture 'archive' rather than x86_64, in this case. A similar fix is required for dtc - again quite trivial, but I can provide that if necessary. The second patch removes the preprocessor conditional around the function event_notifier_init_fd() in util/event_notifier-posix.c so that the link does not fail on systems where CONFIG_POSIX is defined but CONFIG_EVENTFD is not (such as under Mac OS X). There is more information in each of the commits that follows. Please feel free to comment. Cheers, C Christopher Friedt (2): Use libtool instead of ar to create static libraries on Darwin. Remove unnecessary CONFIG_EVENTFD preprocessor conditional to satisfy link rules.mak | 4 ++++ util/event_notifier-posix.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.6.4 (Apple Git-63)