From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3] protobuf: fix build for some unsupported architectures
Date: Thu, 8 May 2014 23:48:50 +0300 [thread overview]
Message-ID: <20140508204850.GO3861@tarshish> (raw)
In-Reply-To: <871tw4cauk.fsf@dell.be.48ers.dk>
Hi Peter,
On Thu, May 08, 2014 at 09:46:27PM +0200, Peter Korsgaard wrote:
> >>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:
>
> > Add patches for making use of generic gcc atomic operations for unknown
> > architectures. Patches taken from
> > http://code.google.com/p/protobuf/issues/detail?id=488 .
>
> > Disable build for architectures that are not supported.
>
> > Fixes:
> > http://autobuild.buildroot.net/results/7e5/7e5791225334096206887de8a38fd947e1f8e9a2/
> > http://autobuild.buildroot.net/results/cf1/cf147b9188d6787a6a1a6072bf9bc6f7ddf5e5ae/
>
> > Cc: Phil Eichinger <phil.eichinger@gmail.com>
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>
> Thanks, but a quick test with powerpc and the default external toolchain
> doesn't build:
>
> BR2_powerpc=y
> BR2_powerpc_603e=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_PACKAGE_PROTOBUF=y
>
> In file included from ./google/protobuf/stubs/atomicops.h:188:0,
> from ./google/protobuf/stubs/once.h:81,
> from google/protobuf/stubs/once.cc:38:
> ./google/protobuf/stubs/atomicops_internals_generic_gcc.h: In function 'google::protobuf::internal::Atomic32 google::protobuf::internal::NoBarrier_CompareAndSwap(volatile google::protobuf::internal::Atomic32*, google::protobuf::internal::Atomic32, google::protobuf::internal::Atomic32)':
> ./google/protobuf/stubs/atomicops_internals_generic_gcc.h:44:31: error: '__ATOMIC_RELAXED' was not declared in this scope
> ./google/protobuf/stubs/atomicops_internals_generic_gcc.h:44:65: error: '__atomic_compare_exchange_n' was not declared in this scope
> ./google/protobuf/stubs/atomicops_internals_generic_gcc.h: In function 'google::protobuf::internal::Atomic32 google::protobuf::internal::NoBarrier_AtomicExchange(volatile google::protobuf::internal::Atomic32*, google::protobuf::internal::Atomic32)':
>
> So it looks like we need to tweak the arch list a bit.
The generic internal atomic ops implementation (which is used to fix powerpc
build) is using the gcc feature of "memory model aware atomic operations".
These were introduced in gcc 4.7, while the Sourcery toolchain is gcc 4.5. I
don't see a straightforward way to depend on gcc version like we have for
kernel headers. Any ideas?
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
next prev parent reply other threads:[~2014-05-08 20:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 13:06 [Buildroot] [PATCH v3] protobuf: fix build for some unsupported architectures Baruch Siach
2014-05-08 19:46 ` Peter Korsgaard
2014-05-08 20:48 ` Baruch Siach [this message]
2014-05-08 21:47 ` Peter Korsgaard
2014-05-09 5:11 ` Baruch Siach
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=20140508204850.GO3861@tarshish \
--to=baruch@tkos.co.il \
--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