Re: [chrony-dev] clock_gettime() on macOS

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


> On 22/08/2016, at 8:14 PM, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
> 
> On Mon, Aug 22, 2016 at 10:49:30AM +1200, Bryan Christianson wrote:
>> We need to make sure that chrony compiled on macOS 10.12 (or later) will still run on versions earlier than macOS 10.12
> 
> Hm, is that a common practice on macOS to run binaries compiled on
> newer version of the system? For instance, on Linux with glibc (using
> versioned symbols) that wouldn't work.

Yeah - It is common practice. Compile on ‘current' software (in this case I’m compiling against the next version but I won’t be releasing any binaries until 10.12 is ‘current') and have runtime checks to ensure the function is implemented. That way you can release a single binary for all the versions of the OS that you have compiled against. Usually you only need to support back 2 or maybe 3 releases of the system software. For example - programs compiled in Swift will run on the version of MacOS that was current prior to Swift being released, OSX 10.9. ChronyControl, compiled on 1.12 will still run on 10.9
> 
>> This patch allows that but I’m not sure it’s structured correctly for chrony and I don’t like the duplication of the gettimeofday() fallback.
>> Another option would be to modify configure so that HAVE_CLOCK_GETTIME is never set on macOS but that doesn’t feel right either.
> 
> I don't know, both seem like ugly hacks to me. I'd rather add a more
> general "--without-clock-gettime" option to the configure script, so
> you can disable it if you have a good reason, but leave the detection
> enabled by default.

OK - That would work

Bryan Christianson
bryan@xxxxxxxxxxxxx




--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/