[PATCH] Enable configuration of the MONOTONIC_CLOCK when cross-compiling.
David James
davidjames at google.com
Wed May 19 14:48:11 PDT 2010
On Wed, May 19, 2010 at 12:04 PM, Mark Kettenis <mark.kettenis at xs4all.nl> wrote:
>> Date: Wed, 19 May 2010 09:12:59 -0700
>> From: David James <davidjames at google.com>
>>
>> On Wed, May 19, 2010 at 8:47 AM, Adam Jackson <ajax at nwnk.net> wrote:
>> > On Tue, 2010-05-18 at 15:17 -0700, David James wrote:
>> >> When xorg-xserver is being cross-compiled, there is currently no way
>> >> for us to detect whether the monotonic clock is available on the
>> >> target system. Currently, in this situation, we default to not use the
>> >> monotonic clock. One problem with this situation is that the user will
>> >> be treated as idle when the date is updated.
>> >>
>> >> To fix this situation, this patch creates a new variable called
>> >> xorg_cv_MONOTONIC_CLOCK. If packagers who cross-compile setup this
>> >> variable appropriately, then we can enable usage of the
>> >> MONOTONIC_CLOCK when cross-compiling.
>> >
>> > This requires editing the configure cache? That's a little non-obvious.
>> > I think the liboil-style compile check is probably fine.
>>
>> The liboil-style compile check is fine? Great! This makes my patch
>> simpler, and saves everybody the trouble of specifying options or
>> environment variables. Please take a look at the updated patch
>> (monotonic-clock-patch-v2.txt).
>
> OpenBSD has a working CLOCK_MONOTONIC implementation, but doesn't define
> _POSIX_MONOTONIC_CLOCK. So I'm afraid this approach doesn't work.
OK. So, should we go with the original approach, then, and just
document a configure cache variable that can be set by users who are
cross-compiling? If you can point me to what documentation needs to be
updated, I'll be happy to update it.
It's also possible to do a hybrid of the two approaches, which would
save some time for users who are cross-compiling to OS's other than
OpenBSD. But I don't know if you want a complex solution for such a
simple problem. Just let me know what you think would be best.
Cheers,
David
More information about the xorg-devel
mailing list