You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/14 15:14:13 UTC

[incubator-nuttx-apps] branch master updated: mksymtab.sh: Avoid using find -executable

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new e5dd0b1  mksymtab.sh: Avoid using find -executable
e5dd0b1 is described below

commit e5dd0b1eb9a060c45a863de2e0e915bff3b6d511
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Feb 14 18:18:57 2020 +0900

    mksymtab.sh: Avoid using find -executable
    
    As it seems GNU-find only.  macOS doesn't have it.
    
    -perm is in POSIX and should be more widely available.
---
 examples/elf/tests/mksymtab.sh              | 2 +-
 examples/module/drivers/mksymtab.sh         | 2 +-
 examples/posix_spawn/filesystem/mksymtab.sh | 2 +-
 examples/sotest/lib/mksymtab.sh             | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/elf/tests/mksymtab.sh b/examples/elf/tests/mksymtab.sh
index 0bdff48..4e8a110 100755
--- a/examples/elf/tests/mksymtab.sh
+++ b/examples/elf/tests/mksymtab.sh
@@ -22,7 +22,7 @@ fi
 # Extract all of the undefined symbols from the ELF files and create a
 # list of sorted, unique undefined variable names.
 
-varlist=`find ${dir} -executable -type f | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq`
+varlist=`find ${dir} -type f -perm -a=x | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq`
 
 # Now output the symbol table as a structure in a C source file.  All
 # undefined symbols are declared as void* types.  If the toolchain does
diff --git a/examples/module/drivers/mksymtab.sh b/examples/module/drivers/mksymtab.sh
index e6d231b..bc4335d 100755
--- a/examples/module/drivers/mksymtab.sh
+++ b/examples/module/drivers/mksymtab.sh
@@ -22,7 +22,7 @@ fi
 # Extract all of the undefined symbols from the MODULE files and create a
 # list of sorted, unique undefined variable names.
 
-varlist=`find ${dir} -executable -type f | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq`
+varlist=`find ${dir} -type f -perm -a=x | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq`
 
 # Now output the symbol table as a structure in a C source file.  All
 # undefined symbols are declared as void* types.  If the toolchain does
diff --git a/examples/posix_spawn/filesystem/mksymtab.sh b/examples/posix_spawn/filesystem/mksymtab.sh
index 4b47205..8b7d4dc 100755
--- a/examples/posix_spawn/filesystem/mksymtab.sh
+++ b/examples/posix_spawn/filesystem/mksymtab.sh
@@ -22,7 +22,7 @@ fi
 # Extract all of the undefined symbols from the ELF files and create a
 # list of sorted, unique undefined variable names.
 
-varlist=`find ${dir} -executable -type f | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq`
+varlist=`find ${dir} -type f -perm -a=x | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq`
 
 # Now output the symbol table as a structure in a C source file.  All
 # undefined symbols are declared as void* types.  If the toolchain does
diff --git a/examples/sotest/lib/mksymtab.sh b/examples/sotest/lib/mksymtab.sh
index 4b5b043..28db68f 100755
--- a/examples/sotest/lib/mksymtab.sh
+++ b/examples/sotest/lib/mksymtab.sh
@@ -23,7 +23,7 @@ fi
 # Extract all of the undefined symbols from the SOTEST files and create a
 # list of sorted, unique undefined variable names.
 
-tmplist=`find ${dir} -executable -type f | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq`
+tmplist=`find ${dir} -type f -perm -a=x | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq`
 
 # Remove the special symbol 'modprint'.  It it is not exported by the
 # base firmware, but rather in this test from one shared library to another.