[oe] [meta-oe][PATCH] gtest: add -fPIC

Khem Raj raj.khem at gmail.com
Tue Mar 28 23:14:46 UTC 2017


On Tue, Mar 28, 2017 at 3:14 PM Martin Kelly <mkelly at xevo.com> wrote:

> On 03/28/2017 02:32 PM, Andre McCurdy wrote:
> >
> > Right. So the question is if security flags are enabled (and therefore
> > -fpie is passed into the gtest build via CFLAGS) then why do you see
> > an issue?
> >
>
> Looking at this more, I see that I hit the issue in dlt-daemon because
> it was trying to compile a shared version of gtest, resulting in this
> error:
>
> command:
> [snip]-g++  -fPIC [snip] -shared -o libgtest.so [snip]
>
> out:
> [snip]/ld: CMakeFiles/gtest.dir/src/gtest-all.cc.o: relocation
> R_X86_64_PC32 against symbol
> `_ZTVN7testing8internal17TestEventRepeaterE' can not be used when making
> a shared object; recompile with -fPIC
>
> However, looking at the gtest version in meta-oe, I see only static
> libraries, as you say. Thus unless we start building shared versions of
> gtest, it looks like this patch is applicable to dlt-daemon but not
> gtest, so we can drop it. Thanks!


Is there any reason not to build shared version though ?

>
>



More information about the Openembedded-devel mailing list