Skip to content

Commit

Permalink
scripts/faddr2line: fix CROSS_COMPILE unset error
Browse files Browse the repository at this point in the history
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: 95a8798 ("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]>
  • Loading branch information
LiucIntel authored and torvalds committed Dec 15, 2017
1 parent 51f73ff commit 4cc90b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/faddr2line
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 4cc90b4

Please sign in to comment.