dlt-daemon: build with -fPIC
[AGL/meta-agl.git] / meta-ivi-common / recipes-extended / dlt-daemon / dlt-daemon_2.11.1.bb
index 183e2e9..dc7cc94 100644 (file)
@@ -29,6 +29,15 @@ S = "${WORKDIR}/git"
 
 inherit gzipnative autotools gettext cmake systemd
 
+# -fPIC is needed to prevent relocation errors when we compile gtest with
+# Yocto security flags. See this issue for more details:
+#
+# https://github.com/google/googletest/issues/854
+#
+# If that issue is fixed, we can probably remove the manual -fPIC flags here.
+OECMAKE_C_FLAGS += " -fPIC"
+OECMAKE_CXX_FLAGS += " -fPIC"
+
 PACKAGES += "${PN}-systemd"
 SYSTEMD_PACKAGES = "${PN} ${PN}-systemd"
 SYSTEMD_SERVICE_${PN} = "dlt-system.service dlt.service"