diff mbox series

[master/kirkstone,09/14] meta-toolchain-arago: update executable fixup for Ubuntu 20.04+ compatibility

Message ID 20221104214112.1221365-10-denis@denix.org
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series 2022.10 sync up with Dunfell | expand

Commit Message

Denys Dmytriyenko Nov. 4, 2022, 9:41 p.m. UTC
From: Andreas Dannenberg <dannenberg@ti.com>

The linux devkit installer patches up the cross toolchain executables'
dynamic library dependencies after installation to reflect the actual
installation location. This is done through the 'file' tool which
starting with Ubuntu 20.04 returns a new link type called 'static-pie
 linked' for files that will need to be patched. To accomodate this
change update the command that is used to identify executables requiring
patching with this new link type.

This fixes dynamic loader errors with cross toolchain tools like flex,
qmake, and others similar to the below:

$ make ti_sdk_arm64_release_defconfig
  LEX     scripts/kconfig/lexer.lex.c
/home/user/ti/processor-sdk-linux-am62axx-evm-08.04.00.20/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/flex: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory
make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
---
 meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb b/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb
index 9dfa6c85..ab484a1e 100644
--- a/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb
+++ b/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb
@@ -303,7 +303,7 @@  if [ "$dl_path" = "" ] ; then
 	echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
 	exit 1
 fi
-executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111 -exec file '{}' \;| grep "\(executable\|dynamically linked\)" | cut -f 1 -d ':')
+executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111 -exec file '{}' \;| grep "\(executable\|dynamically linked\|static-pie linked\)" | cut -f 1 -d ':')
 
 tdir=`mktemp -d`
 if [ x$tdir = x ] ; then