diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-01-21 10:30:01 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-05 12:26:36 +0000 |
commit | ce73f4f9d37096fbb75bc6b069009399da74d27a (patch) | |
tree | 964eeb4ffa19ae9aaed4eddd5c111545444a25ca /meta/classes | |
parent | c560489f788fd4f4e67283ff67e013bc55e75730 (diff) | |
download | poky-ce73f4f9d37096fbb75bc6b069009399da74d27a.tar.gz |
image-prelink: Remove bbclass
Upcoming glibc 2.35 is dropping support for prelinker, this just ensures
that we do not carry non-working classes. [1]
[1] https://patchwork.sourceware.org/project/glibc/patch/20220121172951.285848-2-adhemerval.zanella@linaro.org/
(From OE-Core rev: 857baaf9e3d181ca18264e85d90b899fd94acff9)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image-prelink.bbclass | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass deleted file mode 100644 index 8158eeaf4c..0000000000 --- a/meta/classes/image-prelink.bbclass +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | do_rootfs[depends] += "prelink-native:do_populate_sysroot" | ||
2 | |||
3 | IMAGE_PREPROCESS_COMMAND:append:libc-glibc = " prelink_setup; prelink_image; " | ||
4 | |||
5 | python prelink_setup () { | ||
6 | oe.utils.write_ld_so_conf(d) | ||
7 | } | ||
8 | |||
9 | inherit linuxloader | ||
10 | |||
11 | prelink_image () { | ||
12 | # export PSEUDO_DEBUG=4 | ||
13 | # /bin/env | /bin/grep PSEUDO | ||
14 | # echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" | ||
15 | # echo "LD_PRELOAD=$LD_PRELOAD" | ||
16 | |||
17 | pre_prelink_size=`du -ks ${IMAGE_ROOTFS} | awk '{size = $1 ; print size }'` | ||
18 | echo "Size before prelinking $pre_prelink_size." | ||
19 | |||
20 | # The filesystem may not contain sysconfdir so establish what is present | ||
21 | # to enable cleanup after temporary creation of sysconfdir if needed | ||
22 | presentdir="${IMAGE_ROOTFS}${sysconfdir}" | ||
23 | while [ "${IMAGE_ROOTFS}" != "${presentdir}" ] ; do | ||
24 | [ ! -d "${presentdir}" ] || break | ||
25 | presentdir=`dirname "${presentdir}"` | ||
26 | done | ||
27 | |||
28 | mkdir -p "${IMAGE_ROOTFS}${sysconfdir}" | ||
29 | |||
30 | # We need a prelink conf on the filesystem, add one if it's missing | ||
31 | if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf ]; then | ||
32 | cp ${STAGING_ETCDIR_NATIVE}/prelink.conf \ | ||
33 | ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf | ||
34 | dummy_prelink_conf=true; | ||
35 | else | ||
36 | dummy_prelink_conf=false; | ||
37 | fi | ||
38 | |||
39 | # We need a ld.so.conf with pathnames in,prelink conf on the filesystem, add one if it's missing | ||
40 | ldsoconf=${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf | ||
41 | if [ -e $ldsoconf ]; then | ||
42 | cp $ldsoconf $ldsoconf.prelink | ||
43 | fi | ||
44 | cat ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf >> $ldsoconf | ||
45 | |||
46 | dynamic_loader=${@get_linuxloader(d)} | ||
47 | |||
48 | # prelink! | ||
49 | if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then | ||
50 | export PRELINK_TIMESTAMP=`git log -1 --pretty=%ct ` | ||
51 | else | ||
52 | export PRELINK_TIMESTAMP=$REPRODUCIBLE_TIMESTAMP_ROOTFS | ||
53 | fi | ||
54 | ${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -am -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader | ||
55 | |||
56 | # Remove the prelink.conf if we had to add it. | ||
57 | if [ "$dummy_prelink_conf" = "true" ]; then | ||
58 | rm -f ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf | ||
59 | fi | ||
60 | |||
61 | if [ -e $ldsoconf.prelink ]; then | ||
62 | mv $ldsoconf.prelink $ldsoconf | ||
63 | else | ||
64 | rm $ldsoconf | ||
65 | fi | ||
66 | |||
67 | # Remove any directories temporarily created for sysconfdir | ||
68 | cleanupdir="${IMAGE_ROOTFS}${sysconfdir}" | ||
69 | while [ "${presentdir}" != "${cleanupdir}" ] ; do | ||
70 | rmdir "${cleanupdir}" | ||
71 | cleanupdir=`dirname ${cleanupdir}` | ||
72 | done | ||
73 | |||
74 | pre_prelink_size=`du -ks ${IMAGE_ROOTFS} | awk '{size = $1 ; print size }'` | ||
75 | echo "Size after prelinking $pre_prelink_size." | ||
76 | } | ||