aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ivi-common/recipes-extended
diff options
context:
space:
mode:
authorMartin Kelly <mkelly@xevo.com>2017-03-27 15:06:28 -0700
committerMartin Kelly <mkelly@xevo.com>2017-03-27 15:52:41 -0700
commit7480d16c667a773f6762a15934c4e617b0731f72 (patch)
tree6e4d6becdb0772560139ecfdd55adf075006fa99 /meta-ivi-common/recipes-extended
parent5875cc45a671b1a3e7671ec84ec6ebb1ab17696a (diff)
dlt-daemon: build with -fPIC
I tried turning on the Yocto security flags and hit a compilation error due to dlt-daemon's copy of gtest not compiling. Adding -fPIC fixes the issue. Change-Id: I21f81949436e553426f7d1b7e17dd39717f0cf9d Signed-off-by: Martin Kelly <mkelly@xevo.com>
Diffstat (limited to 'meta-ivi-common/recipes-extended')
-rw-r--r--meta-ivi-common/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb9
-rw-r--r--meta-ivi-common/recipes-extended/dlt-daemon/dlt-daemon_2.15.0.bb9
2 files changed, 18 insertions, 0 deletions
diff --git a/meta-ivi-common/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb b/meta-ivi-common/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb
index 183e2e923..dc7cc9493 100644
--- a/meta-ivi-common/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb
+++ b/meta-ivi-common/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb
@@ -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"
diff --git a/meta-ivi-common/recipes-extended/dlt-daemon/dlt-daemon_2.15.0.bb b/meta-ivi-common/recipes-extended/dlt-daemon/dlt-daemon_2.15.0.bb
index 8ab95d1ec..d068f250f 100644
--- a/meta-ivi-common/recipes-extended/dlt-daemon/dlt-daemon_2.15.0.bb
+++ b/meta-ivi-common/recipes-extended/dlt-daemon/dlt-daemon_2.15.0.bb
@@ -23,6 +23,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"