From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org, Stefan Weil <sw@weilnetz.de>
Subject: [Qemu-devel] [PATCH] Fix cross compilation (nm command)
Date: Thu, 18 Sep 2014 21:55:08 +0200 [thread overview]
Message-ID: <1411070108-8954-1-git-send-email-sw@weilnetz.de> (raw)
Commit c261d774fb9093d00e0938a19f502fb220f62718 added one more binutils
tool: nm also needs a cross prefix.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
configure | 2 ++
rules.mak | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 1a9daa5..5eb95a3 100755
--- a/configure
+++ b/configure
@@ -389,6 +389,7 @@ cpp="${CPP-$cc -E}"
objcopy="${OBJCOPY-${cross_prefix}objcopy}"
ld="${LD-${cross_prefix}ld}"
libtool="${LIBTOOL-${cross_prefix}libtool}"
+nm="${NM-${cross_prefix}nm}"
strip="${STRIP-${cross_prefix}strip}"
windres="${WINDRES-${cross_prefix}windres}"
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
@@ -4889,6 +4890,7 @@ echo "AS=$as" >> $config_host_mak
echo "CPP=$cpp" >> $config_host_mak
echo "OBJCOPY=$objcopy" >> $config_host_mak
echo "LD=$ld" >> $config_host_mak
+echo "NM=$nm" >> $config_host_mak
echo "WINDRES=$windres" >> $config_host_mak
echo "LIBTOOL=$libtool" >> $config_host_mak
echo "CFLAGS=$CFLAGS" >> $config_host_mak
diff --git a/rules.mak b/rules.mak
index 1d73293..cf76b88 100644
--- a/rules.mak
+++ b/rules.mak
@@ -23,7 +23,7 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
QEMU_INCLUDES += -I$(<D) -I$(@D)
WL_U := -Wl,-u,
-find-symbols = $(if $1, $(sort $(shell nm -P -g $1 | $2)))
+find-symbols = $(if $1, $(sort $(shell $(NM) -P -g $1 | $2)))
defined-symbols = $(call find-symbols,$1,awk '$$2!="U"{print $$1}')
undefined-symbols = $(call find-symbols,$1,awk '$$2=="U"{print $$1}')
--
1.7.10.4
next reply other threads:[~2014-09-18 20:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 19:55 Stefan Weil [this message]
2014-09-18 20:07 ` [Qemu-devel] [PATCH] Fix cross compilation (nm command) Peter Maydell
2014-09-19 13:27 ` Paolo Bonzini
2014-09-19 16:20 ` Peter Maydell
2014-09-19 16:41 ` Peter Maydell
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=1411070108-8954-1-git-send-email-sw@weilnetz.de \
--to=sw@weilnetz.de \
--cc=famz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).