Skip to content

Commit 16d3d10

Browse files
LiucIntelgregkh
authored andcommitted
scripts/faddr2line: fix CROSS_COMPILE unset error
commit 4cc90b4cc3d4955f79eae4f7f9d64e67e17b468e upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0146985 commit 16d3d10

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: scripts/faddr2line

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
set -o errexit
4545
set -o nounset
4646

47-
READELF="${CROSS_COMPILE}readelf"
48-
ADDR2LINE="${CROSS_COMPILE}addr2line"
49-
SIZE="${CROSS_COMPILE}size"
50-
NM="${CROSS_COMPILE}nm"
47+
READELF="${CROSS_COMPILE:-}readelf"
48+
ADDR2LINE="${CROSS_COMPILE:-}addr2line"
49+
SIZE="${CROSS_COMPILE:-}size"
50+
NM="${CROSS_COMPILE:-}nm"
5151

5252
command -v awk >/dev/null 2>&1 || die "awk isn't installed"
5353
command -v ${READELF} >/dev/null 2>&1 || die "readelf isn't installed"

0 commit comments

Comments
 (0)