From db5698e3e458f84889ce8a9061f2b7745df4bd1a Mon Sep 17 00:00:00 2001 From: Manuel Bachmann Date: Mon, 6 Jun 2016 15:18:40 +0000 Subject: Fix qml-radio-plugin compilation with security flags Since we added compilation security flags (https://gerrit. automotivelinux.org/gerrit/#/c/5631/), qml-radio-plugin breaks because it relies on libtool, which assumes we want to create an executable due to the flags (-pie) being passed. The bug has been reported upstream: https://lists.gnu.org/archive/html/bug-libtool/2016-05/ msg00004.html but let us work around it since it is a demo target, and an upstream fix will take time to implement and test. Change-Id: I7018df928eb23bc2e8b6afb1aafea46958fd523e Signed-off-by: Manuel Bachmann --- recipes-qt/qml-radio-plugin/qml-radio-plugin_0.2.bb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'recipes-qt/qml-radio-plugin') diff --git a/recipes-qt/qml-radio-plugin/qml-radio-plugin_0.2.bb b/recipes-qt/qml-radio-plugin/qml-radio-plugin_0.2.bb index fad6ed3b..f9e1c630 100644 --- a/recipes-qt/qml-radio-plugin/qml-radio-plugin_0.2.bb +++ b/recipes-qt/qml-radio-plugin/qml-radio-plugin_0.2.bb @@ -22,6 +22,16 @@ EXTRA_OECONF = "--with-moc-dir=${STAGING_BINDIR_NATIVE}/qt5" QML_LIBDIR = "${libdir}/qt5/qml" +do_configure_append() { + # when building with "security_flags.inc", libtool thinks that + # "-pie" means we want an executable, and links with related C + # runtime objects. Work around this until libtool is fixed. + sed -i 's/".\+Scrt1.o/"/g' ${B}/*libtool + sed -i 's/ .\+Scrt1.o/ /g' ${B}/*libtool + sed -i 's/-lgcc / /g' ${B}/*libtool + sed -i 's/-lgcc"/"/g' ${B}/*libtool +} + do_install_append() { # Remove .la files for loadable module rm -f ${D}/${QML_LIBDIR}/radio/*.la -- cgit 1.2.3-korg