aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu, Changcheng <[email protected]>2017-12-14 15:32:48 -0800
committerLinus Torvalds <[email protected]>2017-12-14 16:00:48 -0800
commit4cc90b4cc3d4955f79eae4f7f9d64e67e17b468e (patch)
treecf927d739b15087be6014fdc903e968e2a94ec00
parent51f73fffbf30b335d036ab356b67b05e16e26585 (diff)
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: 95a879825419 ("scripts/faddr2line: extend usage on generic arch") Signed-off-by: Liu Changcheng <[email protected]> Reported-by: Richard Weinberger <[email protected]> Reviewed-by: Richard Weinberger <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Philippe Ombredanne <[email protected]> Cc: NeilBrown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rwxr-xr-xscripts/faddr2line8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/faddr2line b/scripts/faddr2line
index 39e07d8574dd..7721d5b2b0c0 100755
--- a/scripts/faddr2line
+++ b/scripts/faddr2line
@@ -44,10 +44,10 @@
set -o errexit
set -o nounset
-READELF="${CROSS_COMPILE}readelf"
-ADDR2LINE="${CROSS_COMPILE}addr2line"
-SIZE="${CROSS_COMPILE}size"
-NM="${CROSS_COMPILE}nm"
+READELF="${CROSS_COMPILE:-}readelf"
+ADDR2LINE="${CROSS_COMPILE:-}addr2line"
+SIZE="${CROSS_COMPILE:-}size"
+NM="${CROSS_COMPILE:-}nm"
command -v awk >/dev/null 2>&1 || die "awk isn't installed"
command -v ${READELF} >/dev/null 2>&1 || die "readelf isn't installed"