[oe] [meta-oe] [PATCH] json-spirit: Add -latomic to LDFLAGS

Ming Liu liu.ming50 at gmail.com
Thu Aug 10 15:36:49 UTC 2017


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.

//Ming Liu

2017-08-10 17:19 GMT+02:00 Khem Raj <raj.khem at gmail.com>:

> On 8/10/17 8:12 AM, liu.ming50 at gmail.com wrote:
> > From: Ming Liu <peter.x.liu at 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.liu at 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"
> >
>
>
>



More information about the Openembedded-devel mailing list