Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/kodi: disable on mips
Date: Sun, 6 Mar 2016 13:41:41 +0100	[thread overview]
Message-ID: <20160306134141.7fedbb85@free-electrons.com> (raw)
In-Reply-To: <1457255845-20770-1-git-send-email-bernd.kuhls@t-online.de>

Bernd,

On Sun,  6 Mar 2016 10:17:25 +0100, Bernd Kuhls wrote:
> Due to the addition of the BR2_TOOLCHAIN_HAS_SYNC_8 dependency, then
> there is no longer a need to have (BR2_mipsel &&
> BR2_TOOLCHAIN_USES_GLIBC), since MIPS doesn't provide the 8 byte
> __sync_*() intrinsics, and therefore BR2_TOOLCHAIN_HAS_SYNC_8 is false
> on MIPS.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/kodi/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/kodi/Config.in b/package/kodi/Config.in
> index bd40ac3..950d5f9 100644
> --- a/package/kodi/Config.in
> +++ b/package/kodi/Config.in
> @@ -1,6 +1,6 @@
>  config BR2_PACKAGE_KODI_ARCH_SUPPORTS
>  	bool
> -	default y if (BR2_arm || (BR2_mipsel && BR2_TOOLCHAIN_USES_GLIBC) || BR2_i386 || BR2_x86_64) \
> +	default y if (BR2_arm || BR2_i386 || BR2_x86_64) \
>  		&& BR2_PACKAGE_BOOST_ARCH_SUPPORTS \
>  		&& BR2_TOOLCHAIN_HAS_SYNC_8

In fact, I think this is still not good. Why would Kodi have explicit
support for MIPS, if in practice you couldn't build it for MIPS ?

I think the answer lies in the fact that Kodi does not always use the
__sync*() atomic intrinsics. If you look at xbmc/threads/Atomics.cpp,
there are some hand-written atomic operations for various architectures.

So in fact, for some architectures/variants, Kodi is using the compiler
__sync and/or __atomic intrinsics, but for some other
architectures/variants, it does not use them and use its own
implementation instead. This is probably what allows to build on MIPS,
for example. And maybe what allows to build on i586.

Bottom line: this BR2_TOOLCHAIN_HAS_SYNC_8 dependency is wrong, and
some more investigation is needed to understand the combinations of
architectures for which Kodi has its own atomic operations vs. the
combinations for which it relies on __sync/__atomic built-ins.

Could you look into this? This will probably require building Kodi on a
number of architecture variants, and also an investigation of the
atomic code to understand what's going on.

Thanks!

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

  reply	other threads:[~2016-03-06 12:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06  9:17 [Buildroot] [PATCH 1/1] package/kodi: disable on mips Bernd Kuhls
2016-03-06 12:41 ` Thomas Petazzoni [this message]
2016-03-06 16:51   ` Bernd Kuhls

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=20160306134141.7fedbb85@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox