diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2019-09-11 14:13:07 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-16 23:02:43 +0100 |
commit | 0c19c093358fa65d93c86cc8978fa50b5bd97026 (patch) | |
tree | 8f36ee8cbcc1e88c73993fce075b570e03e583d1 /meta | |
parent | 05e583ae84db3d2c0c6331c5e964779478f8fd21 (diff) | |
download | poky-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')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross.inc | 10 |
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" | |||
206 | do_package_write_rpm[noexec] = "1" | 206 | do_package_write_rpm[noexec] = "1" |
207 | do_package_write_deb[noexec] = "1" | 207 | do_package_write_deb[noexec] = "1" |
208 | 208 | ||
209 | BUILDDIRSTASH = "${WORKDIR}/stashed-builddir" | 209 | inherit chrpath |
210 | |||
211 | python gcc_stash_builddir_fixrpaths() { | ||
212 | # rewrite rpaths, breaking hardlinks as required | ||
213 | process_dir("/", d.getVar("BUILDDIRSTASH"), d, break_hardlinks = True) | ||
214 | } | ||
215 | |||
216 | BUILDDIRSTASH = "${WORKDIR}/stashed-builddir/build" | ||
210 | do_gcc_stash_builddir[dirs] = "${B}" | 217 | do_gcc_stash_builddir[dirs] = "${B}" |
211 | do_gcc_stash_builddir[cleandirs] = "${BUILDDIRSTASH}" | 218 | do_gcc_stash_builddir[cleandirs] = "${BUILDDIRSTASH}" |
219 | do_gcc_stash_builddir[postfuncs] += "gcc_stash_builddir_fixrpaths" | ||
212 | do_gcc_stash_builddir () { | 220 | do_gcc_stash_builddir () { |
213 | dest=${BUILDDIRSTASH} | 221 | dest=${BUILDDIRSTASH} |
214 | hardlinkdir . $dest | 222 | hardlinkdir . $dest |