]> code.ossystems Code Review - openembedded-core.git/commitdiff
populate_sdk_base.bbclass: make failure to find ld-linux.so a hard error
authorJason Wessel <jason.wessel@windriver.com>
Fri, 30 Nov 2012 19:34:08 +0000 (19:34 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 3 Dec 2012 14:46:57 +0000 (14:46 +0000)
The shell archive that populates the external SDK should fail if it
cannot find the ld-linux.so else it will corrupt all binaries because
a random path will be used from the list of executables when dl_path
is empty.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/populate_sdk_base.bbclass

index 02ade52d1c707b7249f9459ccbaa71f1ff41cfe1..f20d4390369410c161a26fe3dd8ccb43ca8e3d5b 100644 (file)
@@ -218,6 +218,10 @@ done
 # fix dynamic loader paths in all ELF SDK binaries
 native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep OECORE_NATIVE_SYSROOT|cut -d'=' -f2|tr -d '"')
 dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
+if [ "$dl_path" = "" ] ; then
+       echo "SDK could not be set up. Relocate script to find ld-linux.so. Abort!"
+       exit 1
+fi
 executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm +111)
 $SUDO_EXEC ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files
 if [ $? -ne 0 ]; then