summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Slater <jslater@windriver.com>2017-10-13 15:40:25 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-04 17:14:27 +0000
commit328201fe185b948eacceceefd9d2d2d0ba1ab676 (patch)
treef227f492c6b13b2d0fb1cda89d6972419d842637
parent2987ec994705abb7dd18738ba1719aef9d72049a (diff)
downloadopenembedded-core-328201fe185b948eacceceefd9d2d2d0ba1ab676.tar.gz
openembedded-core-328201fe185b948eacceceefd9d2d2d0ba1ab676.tar.bz2
openembedded-core-328201fe185b948eacceceefd9d2d2d0ba1ab676.zip
rpm: remove --sysroot from macros on target
We do not want to specify --sysroot when defining __cc used on a target. Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com>
-rw-r--r--meta/recipes-devtools/rpm/rpm_git.bb11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_git.bb b/meta/recipes-devtools/rpm/rpm_git.bb
index ea894a3470..7866314ad4 100644
--- a/meta/recipes-devtools/rpm/rpm_git.bb
+++ b/meta/recipes-devtools/rpm/rpm_git.bb
@@ -107,7 +107,8 @@ do_install_append_class-target() {
}
do_install_append () {
- sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}/${libdir}/rpm/macros
+ sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
+ ${D}/${libdir}/rpm/macros
sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
${D}${libdir}/rpm/pythondistdeps.py
@@ -127,3 +128,11 @@ FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
RPROVIDES_${PN} += "rpm-build"
RDEPENDS_${PN} = "bash perl python3-core"
+
+PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
+
+# Do not specify a sysroot when compiling on a target.
+rpm_package_preprocess () {
+ sed -i -e 's:--sysroot[^ ]*::g' \
+ ${PKGD}/${libdir}/rpm/macros
+}