All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Liu, Changcheng" <changcheng.liu@intel.com>
To: tglx@linutronix.de, gregkh@linuxfoundation.org,
	pombredanne@nexb.com, neilb@suse.com,
	richard.weinberger@gmail.com
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	changcheng.liu@intel.com
Subject: [PATCH] scripts/faddr2line: fix CROSS_COMPILE unset error
Date: Wed, 6 Dec 2017 09:30:22 +0800	[thread overview]
Message-ID: <20171206013022.GA83929@sofia> (raw)

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

Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Reported-by: Richard Weinberger <richard.weinberger@gmail.com>

diff --git a/scripts/faddr2line b/scripts/faddr2line
index 39e07d8..7721d5b 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"
-- 
2.7.4

             reply	other threads:[~2017-12-06  1:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06  1:30 Liu, Changcheng [this message]
2017-12-06 19:16 ` [PATCH] scripts/faddr2line: fix CROSS_COMPILE unset error Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171206013022.GA83929@sofia \
    --to=changcheng.liu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.com \
    --cc=pombredanne@nexb.com \
    --cc=richard.weinberger@gmail.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.