summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-cross.inc
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2019-09-11 14:13:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-16 23:02:43 +0100
commit0c19c093358fa65d93c86cc8978fa50b5bd97026 (patch)
tree8f36ee8cbcc1e88c73993fce075b570e03e583d1 /meta/recipes-devtools/gcc/gcc-cross.inc
parent05e583ae84db3d2c0c6331c5e964779478f8fd21 (diff)
downloadpoky-0c19c093358fa65d93c86cc8978fa50b5bd97026.tar.gz
gcc-cross.inc: Process binaries in build dir to be relocatable
Process binaries within the build directory before stashing to be relocatable with ORIGIN relative rpaths. This corrects issues with rpaths being invalid when trying to use the binaries from an unstashed build directory (e.g. gcc-runtime). (From OE-Core rev: 34d9f60a8c2e98fdacbb799af11ec015bc5700f4) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-cross.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index 95af6d89a9..8855bb1f34 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -206,9 +206,17 @@ do_package_write_ipk[noexec] = "1"
206do_package_write_rpm[noexec] = "1" 206do_package_write_rpm[noexec] = "1"
207do_package_write_deb[noexec] = "1" 207do_package_write_deb[noexec] = "1"
208 208
209BUILDDIRSTASH = "${WORKDIR}/stashed-builddir" 209inherit chrpath
210
211python gcc_stash_builddir_fixrpaths() {
212 # rewrite rpaths, breaking hardlinks as required
213 process_dir("/", d.getVar("BUILDDIRSTASH"), d, break_hardlinks = True)
214}
215
216BUILDDIRSTASH = "${WORKDIR}/stashed-builddir/build"
210do_gcc_stash_builddir[dirs] = "${B}" 217do_gcc_stash_builddir[dirs] = "${B}"
211do_gcc_stash_builddir[cleandirs] = "${BUILDDIRSTASH}" 218do_gcc_stash_builddir[cleandirs] = "${BUILDDIRSTASH}"
219do_gcc_stash_builddir[postfuncs] += "gcc_stash_builddir_fixrpaths"
212do_gcc_stash_builddir () { 220do_gcc_stash_builddir () {
213 dest=${BUILDDIRSTASH} 221 dest=${BUILDDIRSTASH}
214 hardlinkdir . $dest 222 hardlinkdir . $dest