Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-31 Thread Petr Kulhavy
Thanks, Richard. That's a good catch. I'm going to fix that. Regards Petrr On 30/05/17 08:00, Richard Cochran wrote: On Mon, May 15, 2017 at 11:37:05PM +0200, Petr Kulhavy wrote: I'm trying to get linuxptp into Buildroot so that it compiles on all 49 targets. FYI, your buildroot patch ht

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-29 Thread Richard Cochran
On Tue, May 23, 2017 at 11:43:57AM +0200, Petr Kulhavy wrote: > I'm not sure that you fully understand the problem. It seems there are > currently four scenarios possible. Yeah, I get that. Your task then would have been to address the four possibilities. > Now the question is how to handle this

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-29 Thread Richard Cochran
On Mon, May 15, 2017 at 11:37:05PM +0200, Petr Kulhavy wrote: > I'm trying to get linuxptp into Buildroot so that it compiles on all 49 > targets. FYI, your buildroot patch http://lists.busybox.net/pipermail/buildroot/2017-May/192051.html has another issue. If you build beaglebone_defconfig

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-23 Thread Petr Kulhavy
Hi Richard, I'm not sure that you fully understand the problem. It seems there are currently four scenarios possible. 1) Some earlier versions of uclibc don't have clock_nanosleep() at all. In some versions it is configurable as you correctly mentioned, so we have case 2) is present and selecte

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-23 Thread Petr Kulhavy
That is misleading. Some earlier versions of uclibc completely lack clock_nanosleep(). Petr On 23/05/17 06:42, Richard Cochran wrote: > On Mon, May 22, 2017 at 11:05:39PM +0200, Petr Kulhavy wrote: >> If you don't like it, please take my email just as a bugreport: linuxptp >> fails to build with

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-22 Thread Richard Cochran
On Mon, May 22, 2017 at 11:05:39PM +0200, Petr Kulhavy wrote: > I can't find any rational argument against test-compiling a piece of code in > that negatively loaded emotional outburst you referred to. you still have to do the hard work and figure out the right way to explain to the autocr

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-22 Thread Richard Cochran
On Mon, May 22, 2017 at 11:05:39PM +0200, Petr Kulhavy wrote: > If you don't like it, please take my email just as a bugreport: linuxptp > fails to build with uclibc, details in my previous emails. Let me fix that for you: bugreport: Improperly configured uClibc lacks clock_nanosleep. > I don't

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-22 Thread Petr Kulhavy
Hi Richard, It is not my primary objective to make your project run under uclibc. I'm working on a project that uses Linuxptp on an embedded system, so I needed to integrate it into Buildroot. Since it was failing the integration test, I had to patch it. And I contributed my patches because I f

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-21 Thread Richard Cochran
On Mon, May 22, 2017 at 12:09:06AM +0200, Petr Kulhavy wrote: > I'm not a uclibc expert, so I can't answer under what conditions > clock_nanosleep is defined. TYou would need to ask the uclibc authors. And just who might they be? If you want this to work on uClibc, then *you* could ask them! > B

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-21 Thread Petr Kulhavy
Hi Richard, the clock_nanosleep test fails in 6 of 49 built targets of Buildroot: br-arm-full-nothread, br-bfin-full, br-m68k-68040-full, br-microblazeel-full, br-openrisc-uclibc, br-sparc-uclibc. They all use uclibc. I'm not a uclibc expert, so I can't answer under what conditions clock_nanos

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-21 Thread Richard Cochran
On Mon, May 15, 2017 at 11:37:05PM +0200, Petr Kulhavy wrote: > However it is too weak. On some targets clock_nanosleep is defined > conditionally in #if preprocessor directives. > There is no way to detect that with grep. Is this a configuration option for uClibc? If so, then correct solution is

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-15 Thread Petr Kulhavy
I'm afraid this is the only way. I originally tried the same grep approach as for the clock_adjtime, etc. However it is too weak. On some targets clock_nanosleep is defined conditionally in #if preprocessor directives. There is no way to detect that with grep. I'm trying to get linuxptp into Bui

Re: [Linuxptp-devel] [PATCH 4/4] Improve detection of clock_nanosleep

2017-05-15 Thread Richard Cochran
On Mon, May 15, 2017 at 10:17:54AM +0200, Petr Kulhavy wrote: > On some platforms compilation issues due to clock_nanosleep were occuring. The > simple test for __uClinux__ was not sufficient. > > Implement full detection of clock_nanosleep in incdefs.h by compiling a short > C > file. incdefs.s