populate_sdk: verify executable or dynamically linked library
authoryzhu1 <yanjun.zhu@windriver.com>
Tue, 26 Nov 2013 08:38:28 +0000 (08:38 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 3 Dec 2013 17:45:53 +0000 (17:45 +0000)
When toolchain directory is changed to execute mode, some non-executable
files or empty files are sorted. This will result in some errors. Thus when
sorting executable files or dynamically linked library, additional conditions
are to exclude non-executable files or empty files.

(From OE-Core rev: c9d56308bfa9ee7f4a9b22eae86390626ddc1c35)

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 b7ea851..29890e3 100644 (file)
@@ -253,7 +253,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)
+executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111 -exec file '{}' \;| grep "\(executable\|dynamically linked\)" | cut -f 1 -d ':') 
 
 tdir=`mktemp -d`
 if [ x$tdir = x ] ; then