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 2/2] package/ltp-testsuite: disable for sparc
Date: Mon, 8 May 2017 22:54:21 +0200	[thread overview]
Message-ID: <20170508225421.14efb2b1@free-electrons.com> (raw)
In-Reply-To: <dfb284aa-556a-e072-6901-75e45f0a8762@gmail.com>

Hello,

On Mon, 8 May 2017 22:31:00 +0200, Romain Naour wrote:

> > This is wrong: we have BR2_TOOLCHAIN_HAS_SYNC_xyz symbols for this.
> > Sparc is not the only architecture affected.  
> 
> I was able to build ltp-testsuite with the following config where none of
> BR2_TOOLCHAIN_HAS_SYNC_* are set:
> 
> BR2_arcle=y
> # BR2_ARC_ATOMIC_EXT is not set
> BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
> BR2_PACKAGE_LTP_TESTSUITE=y
> 
> Other architecture are not available due to toolchain dependencies
> 
> So It's seems related to sparc.
> 
> I tested with test-pkg to discover these two build issues.

Investigation of include/tst_atomic.h explains what's happening. Here
is the code in tst_atomic.h:

#if HAVE_SYNC_ADD_AND_FETCH == 1
static inline int tst_atomic_add_return(int i, int *v)
{
        return __sync_add_and_fetch(v, i);
}

#elif defined(__i386__) || defined(__x86_64__)
... x86 specific implementation of tst_atomic_add_return()
#elif defined(__powerpc__) || defined(__powerpc64__)
... powerpc specific implementation of tst_atomic_add_return()
#elif defined(__s390__) || defined(__s390x__)
... S390 specific implementation of tst_atomic_add_return()
#elif defined(__arc__)
... ARC specific implementation of tst_atomic_add_return()
#else /* HAVE_SYNC_ADD_AND_FETCH == 1 */
# error Your compiler does not provide __sync_add_and_fetch and LTP\
        implementation is missing for your architecture.
#endif

So, the right dependency is:

	# Needs __sync*() built-ins for 4-byte data, except on a few
	# architectures for which a specific implementation is provided
	# in ltp-testsuite
	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_arc || BR2_i386 || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64

Best regards,

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

  reply	other threads:[~2017-05-08 20:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 19:08 [Buildroot] [PATCH 1/2] package/ltp-testsuite: remove ldd commande test with static only build Romain Naour
2017-05-08 19:08 ` [Buildroot] [PATCH 2/2] package/ltp-testsuite: disable for sparc Romain Naour
2017-05-08 19:25   ` Thomas Petazzoni
2017-05-08 20:31     ` Romain Naour
2017-05-08 20:54       ` Thomas Petazzoni [this message]
2017-05-08 21:19         ` Romain Naour

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=20170508225421.14efb2b1@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