diff mbox series

[3/5] libseccomp: use libtool to install test binaries

Message ID 20251218174248.2580279-3-ross.burton@arm.com
State New
Headers show
Series [1/5] scripts/makefile-getvar: be more resilient | expand

Commit Message

Ross Burton Dec. 18, 2025, 5:42 p.m. UTC
Instead of installing the libtool wrapper scripts and hoping that the
real binaries are in .libs/, just use libtool to install the binaries
directly.

This will relink if needed, and removes any assumptions about file
locations.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../libseccomp/libseccomp_2.6.0.bb             | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb b/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb
index dd56391e1ff..2c06824a799 100644
--- a/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb
+++ b/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb
@@ -32,13 +32,13 @@  do_compile_ptest() {
 do_install_ptest() {
     install -d ${D}${PTEST_PATH}/tests
     for file in $(find ${S}/tests/* -executable -type f); do
-        install -m 744 $file ${D}/${PTEST_PATH}/tests
-    done
-    for file in $(find ${B}/tests/* -executable -type f); do
-        install -m 744 $file ${D}/${PTEST_PATH}/tests
+        install $file ${D}/${PTEST_PATH}/tests
     done
     for file in $(find ${S}/tests/*.tests -type f); do
-        install -m 744 $file ${D}/${PTEST_PATH}/tests
+        install $file ${D}/${PTEST_PATH}/tests
+    done
+    for file in $(find ${B}/tests/* -executable -type f); do
+        ${B}/libtool --mode=install install $file ${D}/${PTEST_PATH}/tests
     done
         for file in $(find ${S}/tests/*.pfc -type f); do
         install -m 644 $file ${D}/${PTEST_PATH}/tests
@@ -47,14 +47,10 @@  do_install_ptest() {
 
     install -d ${D}${PTEST_PATH}/tools
     for file in $(find ${S}/tools/* -executable -type f); do
-        install -m 744 $file ${D}/${PTEST_PATH}/tools
+        install $file ${D}/${PTEST_PATH}/tools
     done
     for file in $(find ${B}/tools/* -executable -type f); do
-        install -m 744 $file ${D}/${PTEST_PATH}/tools
-    done
-    # Overwrite libtool wrappers with real executables
-    for file in $(find ${B}/tools/.libs/* -executable -type f); do
-        install -m 744 $file ${D}/${PTEST_PATH}/tools
+        ${B}/libtool --mode=install install $file ${D}/${PTEST_PATH}/tools
     done
 
     # fix python shebang