Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] nilfs-utils: need NPTL threads
Date: Thu, 4 Jan 2018 16:52:13 +0100	[thread overview]
Message-ID: <20180104155213.GC3684@scaer> (raw)
In-Reply-To: <20180104112815.GD18339@airbook.vandijck-laurijssen.be>

On 2018-01-04 12:28 +0100, Kurt Van Dijck spake thusly:
> > Hi Thomas,
> > 
> > On Thu, Jan 04, 2018 at 11:33:36AM +0100, Thomas Petazzoni wrote:
> > > On Thu, 4 Jan 2018 12:19:27 +0200, Baruch Siach wrote:
> > > 
> > > > On Thu, Jan 04, 2018 at 11:10:51AM +0100, Kurt Van Dijck wrote:
> > > > > nilfs-utils use clock_nanosleep(), which comes with NPTL threads  
> > > > 
> > > > What is your indication that this is the case?
> 
> The input of Thomas below indeed was my indication.
> Adding this effectively solved/avoided build problems
> using toolchains with threads but without NPTL threads.
> So I thought the puzzle was complete here ...
> 
> > > > In the uClibc-ng config 
> > > > UCLIBC_HAS_REALTIME is selected by both linuxthreads and NPTL. When 
> > > > UCLIBC_HAS_REALTIME is enabled, UCLIBC_HAS_ADVANCED_REALTIME is also enabled 
> > > > by default. UCLIBC_HAS_ADVANCED_REALTIME provides clock_nanosleep().
> > > 
> > > I haven't looked at it in detail, but:
> > > 
> > > package/blktrace/Config.in:     depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # clock_nanosleep()
> > 
> > Added in commit 08b9e24eaa4e. No previous threads dependency.
> > 
> > > package/can-utils/Config.in:    depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # clock_nanosleep()
> > 
> > Added in commit dbfca7963049. No previous threads dependency.
> > 
> > > package/dvblast/Config.in:      depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # clock_nanosleep()
> > 
> > Added in commit ec875d9bf9b183, changed from a previous plain threads 
> > dependency.
> 
> > 
> > Yann, do you remember the reason why "clock_nanosleep() is only availabe with 
> > NPTL" as commit ec875d9bf9b183 says?

No, I am not sure, but the current code of uClibc-ng has:

    $ cat librt/Makefile.in
    [...]
    17 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
    18 librt_filter_SRC += mq_notify.c timer_create.c timer_delete.c \
    19 	timer_getoverr.c timer_gettime.c timer_settime.c
    20 else
    21 librt_filter_SRC += clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c
    22 endif
    [...]

So, if I read that correctly, the clock_*.c files are excluded (filtered)
if there is no support for native threads.

Now, since glibc and musl always have NPTL and always have clock_nanosleep,
and only uClibc has a conditional NPTL, we made clock_nanosleep et al.
depend on NPTL.

Q.E.D.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2018-01-04 15:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04 10:10 [Buildroot] [PATCH 1/2] nilfs-utils: need NPTL threads Kurt Van Dijck
2018-01-04 10:10 ` [Buildroot] [PATCH 2/2] nilfs-utils: fix build with static toolchains Kurt Van Dijck
2018-01-06 14:47   ` Thomas Petazzoni
2018-01-06 20:30     ` Kurt Van Dijck
2018-01-04 10:19 ` [Buildroot] [PATCH 1/2] nilfs-utils: need NPTL threads Baruch Siach
2018-01-04 10:33   ` Thomas Petazzoni
2018-01-04 10:51     ` Baruch Siach
2018-01-04 11:28       ` Kurt Van Dijck
2018-01-04 15:52         ` Yann E. MORIN [this message]
2018-01-04 17:23           ` Baruch Siach
     [not found]             ` <20180104201958.GB5130@waldemar-brodkorb.de>
2018-01-05  5:23               ` Baruch Siach
2018-01-05 10:17                 ` Kurt Van Dijck
2018-01-05 10:31                   ` Thomas Petazzoni
2018-01-05 11:24                   ` Baruch Siach
2018-01-05 13:20                     ` Kurt Van Dijck
2018-01-05 14:03                       ` Baruch Siach
2018-01-07 20:08                 ` Waldemar Brodkorb
2018-01-05 19:56   ` Kurt Van Dijck
2018-01-06 14:35 ` Thomas Petazzoni
2018-01-06 20:32   ` Kurt Van Dijck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180104155213.GC3684@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox