diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-04 16:28:40 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-07 00:11:40 +0000 |
| commit | ae85c4b9a6609523c293173843679733b1ede7ba (patch) | |
| tree | 9a110d52b2cd54f428acea5e787c274b2309eddc /meta/classes/image-prelink.bbclass | |
| parent | 0b84897ea813a4f7a8b198efcc7ac335debf19d9 (diff) | |
| download | poky-ae85c4b9a6609523c293173843679733b1ede7ba.tar.gz | |
linuxloader/image-prelink/image-mklibs: Fix non-standard path prelinking
Prelinking on x86-64 wasn't working out the box as it uses /lib and
not /lib64 for libs. Prelink was refusing to link as the dynamic loader
didn't match its idea of the right path. Passing in the --dyanmic-linker
option avoids this.
We can share code from image-mklibs so abstract that into a new class,
linuxloader.bbclass.
This does break prelinking of multilib images, I've opened a bug so we
can loop back and fix that problem, the code would need to iterate the
dynamic loaders (and setup ld.so.conf files for it).
(From OE-Core rev: 7c3f2f61536cc8e0322087558cdcfe29ee2fac6d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image-prelink.bbclass')
| -rw-r--r-- | meta/classes/image-prelink.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass index 53c4b0b112..e153f47881 100644 --- a/meta/classes/image-prelink.bbclass +++ b/meta/classes/image-prelink.bbclass | |||
| @@ -6,6 +6,8 @@ python prelink_setup () { | |||
| 6 | oe.utils.write_ld_so_conf(d) | 6 | oe.utils.write_ld_so_conf(d) |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | inherit linuxloader | ||
| 10 | |||
| 9 | prelink_image () { | 11 | prelink_image () { |
| 10 | # export PSEUDO_DEBUG=4 | 12 | # export PSEUDO_DEBUG=4 |
| 11 | # /bin/env | /bin/grep PSEUDO | 13 | # /bin/env | /bin/grep PSEUDO |
| @@ -31,8 +33,10 @@ prelink_image () { | |||
| 31 | fi | 33 | fi |
| 32 | cat ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf >> $ldsoconf | 34 | cat ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf >> $ldsoconf |
| 33 | 35 | ||
| 36 | dynamic_loader=$(linuxloader) | ||
| 37 | |||
| 34 | # prelink! | 38 | # prelink! |
| 35 | ${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf | 39 | ${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader |
| 36 | 40 | ||
| 37 | # Remove the prelink.conf if we had to add it. | 41 | # Remove the prelink.conf if we had to add it. |
| 38 | if [ "$dummy_prelink_conf" = "true" ]; then | 42 | if [ "$dummy_prelink_conf" = "true" ]; then |
