summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/imx-gpu-viv
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-09-17 15:38:12 -0700
committerKhem Raj <raj.khem@gmail.com>2022-09-19 14:10:20 -0700
commitd91b6dac7dd7c0879b3a4a5f8f3abd82c33780b7 (patch)
tree53f6f54289aa80a681bfb1b558c1580045de3fbb /recipes-graphics/imx-gpu-viv
parent5eb46c66701552d66cfb16445a4d40244c97c96f (diff)
downloadmeta-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/imx-gpu-viv')
-rw-r--r--recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc20
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.
26DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa', '', d)}" 26DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa', '', d)}"
27 27
28DEPENDS:append:libc-musl = " gcompat"
29
28PROVIDES += " \ 30PROVIDES += " \
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
249do_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
247ALLOW_EMPTY:${PN} = "1" 267ALLOW_EMPTY:${PN} = "1"
248 268
249FILES:libclc-imx = "${libdir}/libCLC${SOLIBS} ${includedir}/CL/cl_viv_vx_ext.h" 269FILES:libclc-imx = "${libdir}/libCLC${SOLIBS} ${includedir}/CL/cl_viv_vx_ext.h"