qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2][RESENT-INLINE] Resolve link errors on Mac OS X
@ 2016-05-03  1:01 Christopher Friedt
  2016-05-03  1:01 ` [Qemu-devel] [PATCH 1/2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin Christopher Friedt
  2016-05-03  1:01 ` [Qemu-devel] [PATCH 2/2] [RESENT-INLINE] Remove unnecessary CONFIG_EVENTFD preprocessor conditional to satisfy link Christopher Friedt
  0 siblings, 2 replies; 4+ messages in thread
From: Christopher Friedt @ 2016-05-03  1:01 UTC (permalink / raw)
  To: famz, mst; +Cc: Christopher Friedt, qemu-devel, qemu-trivial

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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-03  7:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03  1:01 [Qemu-devel] [PATCH 0/2][RESENT-INLINE] Resolve link errors on Mac OS X Christopher Friedt
2016-05-03  1:01 ` [Qemu-devel] [PATCH 1/2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin Christopher Friedt
2016-05-03  1:01 ` [Qemu-devel] [PATCH 2/2] [RESENT-INLINE] Remove unnecessary CONFIG_EVENTFD preprocessor conditional to satisfy link Christopher Friedt
2016-05-03  6:59   ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).