On 25/10/2016 11:43, Liviu Ionescu wrote: > In Xcode 8 (more or less mandatory after upgrading to Sierra), Apple added > support for `clock_gettime(CLOCK_MONOTONIC, &ts)`, which is not bad in itself. > > Unfortunately, with this addition, a QEMU built on 10.12 runs **only** on > 10.12; on previous versions it fails with something like: > > ``` > $ ./qemu-system-gnuarmeclipse --version > dyld: lazy symbol binding failed: Symbol not found: _clock_gettime > Referenced from: /Applications/GNU ARM > Eclipse/QEMU/2.6.0-201610170917-dev/bin/./qemu-system-gnuarmeclipse (which > was built for Mac OS X 10.12) > Expected in: /usr/lib/libSystem.B.dylib > ``` > > The explanation is simple, for previous versions `_clock_gettime` is > not available in the system library. > > Apple does some tricks with macros in `time.h` to specify that the > definitions were introduced in 10.12, but QEMU uses only `#ifdef > CLOCK_MONOTONIC` to select the use of `clock_gettime()`. > > Until a more elaborate solution will be considered, my workaround was > to replace `#ifdef CLOCK_MONOTONIC` with `#if > defined(CLOCK_MONOTONIC) && !defined(__APPLE__)` and so avoid > references to `clock_gettime()`.
I think you need to use -mmacosx-version-min=10.10 or something like that, using the configure flag --extra-cflags. Paolo