kbuild: fix scripts/adjust_autoksyms.sh* for the no modules case

When CONFIG_TRIM_UNUSED_KSYMS=y and no modules are actually selected,
the adjust_autoksyms.sh script fails with:

sed: can't read .tmp_versions/*.mod: No such file or directory

Let's cope with that case gracefully.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
This commit is contained in:
Nicolas Pitre 2016-12-08 14:17:03 -05:00 committed by Michal Marek
parent 0f66784ae2
commit d073472ac2
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ cat > "$new_ksyms_file" << EOT
*/
EOT
[ "$(ls -A "$MODVERDIR")" ] &&
sed -ns -e '3{s/ /\n/g;/^$/!p;}' "$MODVERDIR"/*.mod | sort -u |
while read sym; do
if [ -n "$CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX" ]; then