On Thu, Aug 10, 2017 at 8:36 AM, Ming Liu <liu.min...@gmail.com> wrote:
> Hi, Khem:
>
> I added that since I observed the error only on a armv5e machine, error did
> not show up on cortexa8/x86_64 machines, so I attempted to guess that option
> would not be always needed, for instance, if some ARCH support atomic
> instructions.

We should add it for armv5 alone then, for other arches, gcc does provide
needed atomics.

>
> //Ming Liu
>
> 2017-08-10 17:19 GMT+02:00 Khem Raj <raj.k...@gmail.com>:
>>
>> On 8/10/17 8:12 AM, liu.min...@gmail.com wrote:
>> > From: Ming Liu <peter.x....@external.atlascopco.com>
>> >
>> > This fixes following errors when compiling with clang:
>> > | ../json_spirit/libjson_spirit.so.4.0.8: error: undefined reference to
>> > '__atomic_load_4'
>> > | ../json_spirit/libjson_spirit.so.4.0.8: error: undefined reference to
>> > '__atomic_compare_exchange_4'
>> > | ../json_spirit/libjson_spirit.so.4.0.8: error: undefined reference to
>> > '__atomic_fetch_sub_4'
>> > | ../json_spirit/libjson_spirit.so.4.0.8: error: undefined reference to
>> > '__atomic_fetch_add_4'
>> >
>> > Signed-off-by: Ming Liu <peter.x....@external.atlascopco.com>
>> > ---
>> >  meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb | 2 ++
>> >  1 file changed, 2 insertions(+)
>> >
>> > diff --git a/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb
>> > b/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb
>> > index 53bbf7e..2f456bf 100644
>> > --- a/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb
>> > +++ b/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb
>> > @@ -17,6 +17,8 @@ S = "${WORKDIR}/json_spirit_v${PV}"
>> >
>> >  DEPENDS = "boost"
>> >
>> > +LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
>>
>> Do we need --as-needed
>>
>> > +
>> >  inherit cmake
>> >
>> >  FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibJsonSpirit.cmake"
>> >
>>
>>
>
-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to