All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] package/multicat: fix build with external Blackfin uClibc toolchain
Date: Sun, 20 Mar 2016 15:22:12 +0100	[thread overview]
Message-ID: <20160320152212.54caaaa6@free-electrons.com> (raw)
In-Reply-To: <1458430906-8291-3-git-send-email-joerg.krause@embedded.rocks>

Hello,

On Sun, 20 Mar 2016 00:41:46 +0100, J?rg Krause wrote:
> multicat uses clock_nanosleep() conditionally if HAVE_NANOSLEEP is defined. The
> bad is that multicat does not check for clock_nanosleep(), but defines

"bad .." ?

> HAVE_NANOSLEEP if __APPLE__ is not defined.
> 
> uClibc has clock_nanosleep() only if built with UCLIBC_HAS_ADVANCED_REALTIME.
> and the external Blackfin toolchain has no support for clock_nanosleep().

Are you sure? Here the Blackfin toolchain does have
UCLIBC_HAS_ADVANCED_REALTIME:

$ grep ADVANCED_REALTIME output/staging/usr/include/bits/uClibc_config.h 
#define __UCLIBC_HAS_ADVANCED_REALTIME__ 1

But indeed it doesn't have clock_nanosleep().

When I saw your patch, I was hoping to be able to replace it with a
patch that tests __UCLIBC__ and __UCLIBC_HAS_ADVANCED_REALTIME__ to
determine whether we have clock_nanosleep() or not. But it seems like
some other things on Blackfin has the consequence that we don't have
clock_nanosleep(). I looked at uClibc 0.9.33.2 (which is used in the
Blackfin toolchain, as far as I can see), and I couldn't see why
clock_nanosleep() was not provided.


> +# multicat does not test for HAVE_CLOCK_NANOSLEEP, but sets it if __APPLE__ is
> +# not defined. The external Blackfin toolchain is uClibc which has
> +# clock_nanosleep() only if built with UCLIBC_HAS_ADVANCED_REALTIME.
> +# Use a hool to overwrite the definition of HAVE_CLOCK_NANOSLEEP for this

hool -> hook

> +# toolchain.
> +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX),y)
> +define MULTICAT_FIXUP_HAVE_CLOCK_NANOSLEEP
> +$(SED) 's#define HAVE_CLOCK_NANOSLEEP#undef HAVE_CLOCK_NANOSLEEP#g' $(@D)/util.h
> +endef
> +MULTICAT_POST_PATCH_HOOKS += MULTICAT_FIXUP_HAVE_CLOCK_NANOSLEEP
> +endif

I'll be OK to fix this with a hook, but I'd like to understand why we
don't have clock_nanosleep() on Blackfin. It might affect a significant
number of other packages I believe.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2016-03-20 14:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-19 23:41 [Buildroot] [PATCH 1/3] package/multicat: add patch to fix static build Jörg Krause
2016-03-19 23:41 ` [Buildroot] [PATCH 2/3] package/multicat: add patch to fix musl build Jörg Krause
2016-03-20 14:11   ` Thomas Petazzoni
2016-03-19 23:41 ` [Buildroot] [PATCH 3/3] package/multicat: fix build with external Blackfin uClibc toolchain Jörg Krause
2016-03-20 14:22   ` Thomas Petazzoni [this message]
2016-03-20 17:09     ` Jörg Krause
2016-03-20 17:13       ` Thomas Petazzoni
2016-03-20 14:09 ` [Buildroot] [PATCH 1/3] package/multicat: add patch to fix static build Thomas Petazzoni

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=20160320152212.54caaaa6@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.