提交 4cc90b4c 编写于 作者: L Liu, Changcheng 提交者: Linus Torvalds

scripts/faddr2line: fix CROSS_COMPILE unset error

faddr2line hit var unbound error when CROSS_COMPILE isn't set since
nounset option is set in bash script.

Link: http://lkml.kernel.org/r/20171206013022.GA83929@sofia
Fixes: 95a87982 ("scripts/faddr2line: extend usage on generic arch")
Signed-off-by: NLiu Changcheng <changcheng.liu@intel.com>
Reported-by: NRichard Weinberger <richard.weinberger@gmail.com>
Reviewed-by: NRichard Weinberger <richard@nod.at>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: NeilBrown <neilb@suse.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 51f73fff
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
set -o errexit set -o errexit
set -o nounset set -o nounset
READELF="${CROSS_COMPILE}readelf" READELF="${CROSS_COMPILE:-}readelf"
ADDR2LINE="${CROSS_COMPILE}addr2line" ADDR2LINE="${CROSS_COMPILE:-}addr2line"
SIZE="${CROSS_COMPILE}size" SIZE="${CROSS_COMPILE:-}size"
NM="${CROSS_COMPILE}nm" NM="${CROSS_COMPILE:-}nm"
command -v awk >/dev/null 2>&1 || die "awk isn't installed" command -v awk >/dev/null 2>&1 || die "awk isn't installed"
command -v ${READELF} >/dev/null 2>&1 || die "readelf isn't installed" command -v ${READELF} >/dev/null 2>&1 || die "readelf isn't installed"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册