diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-09-17 15:38:12 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-09-19 14:10:20 -0700 |
commit | d91b6dac7dd7c0879b3a4a5f8f3abd82c33780b7 (patch) | |
tree | 53f6f54289aa80a681bfb1b558c1580045de3fbb /recipes-graphics | |
parent | 5eb46c66701552d66cfb16445a4d40244c97c96f (diff) | |
download | meta-freescale-d91b6dac7dd7c0879b3a4a5f8f3abd82c33780b7.tar.gz |
imx-gpu-viv: Insert libgcompat.so to DT_NEEDED section of libs
These libs are pre-compiled for glibc therefore, on musl they will need
redirecting via the gcompat stub to work at runtime.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-graphics')
-rw-r--r-- | recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc index 4abab088..48d3ad2b 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc | |||
@@ -25,6 +25,8 @@ DEPENDS:append:mx8-nxp-bsp = " patchelf-native" | |||
25 | # We depend on mesa to fill in what is missing. | 25 | # We depend on mesa to fill in what is missing. |
26 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa', '', d)}" | 26 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa', '', d)}" |
27 | 27 | ||
28 | DEPENDS:append:libc-musl = " gcompat" | ||
29 | |||
28 | PROVIDES += " \ | 30 | PROVIDES += " \ |
29 | imx-gpu-viv \ | 31 | imx-gpu-viv \ |
30 | libgal-imx \ | 32 | libgal-imx \ |
@@ -244,6 +246,24 @@ do_install () { | |||
244 | chown -R root:root "${D}" | 246 | chown -R root:root "${D}" |
245 | } | 247 | } |
246 | 248 | ||
249 | do_install:append:libc-musl() { | ||
250 | # libs | ||
251 | for f in `find ${D}${libdir} -name '*.so*' -type f` | ||
252 | do | ||
253 | patchelf --add-needed libgcompat.so.0 $f | ||
254 | done | ||
255 | # binaries | ||
256 | for f in `find ${D}/opt ${D}${bindir} -name '*' -type f -executable` | ||
257 | do | ||
258 | # prune scripts | ||
259 | if `patchelf --print-interpreter $f 2>&1 > /dev/null` | ||
260 | then | ||
261 | patchelf --set-interpreter ${root_prefix}`patchelf --print-interpreter $f` $f | ||
262 | patchelf --add-needed libgcompat.so.0 $f | ||
263 | fi | ||
264 | done | ||
265 | } | ||
266 | |||
247 | ALLOW_EMPTY:${PN} = "1" | 267 | ALLOW_EMPTY:${PN} = "1" |
248 | 268 | ||
249 | FILES:libclc-imx = "${libdir}/libCLC${SOLIBS} ${includedir}/CL/cl_viv_vx_ext.h" | 269 | FILES:libclc-imx = "${libdir}/libCLC${SOLIBS} ${includedir}/CL/cl_viv_vx_ext.h" |