On 03/28/2017 01:47 PM, Khem Raj wrote:


On 3/28/17 1:37 PM, Andre McCurdy wrote:
On Tue, Mar 28, 2017 at 12:33 PM, Martin Kelly <[email protected]> wrote:
From: Martin Kelly <[email protected]>

I tried turning on the Yocto security flags and hit a compilation
error due to gtest not compiling. Adding -fPIC fixes the issue.

Since gtest only creates static libraries, compiling everything with
-fPIC might not be the correct solution.

it still is going to be linked with a PIE binary then it should be PIC


Yes, I should probably clarify that gtest itself compiles just fine, but the failure occurs when you try to link against it. As an example from the AGL project, dlt-daemon fails to link with security flags turned on, with an error message indicating that -fPIC should be added.

More context here:
https://gerrit.automotivelinux.org/gerrit/#/c/8935/
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to