Skip to contentSkip to conversation

Fix cross compilation (nm command)

PATCH Applied Stefan Weil 3 participants 5 messages Sep 18, 2014 – Sep 19, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix cross compilation (nm command)

Commit c261d774fb9093d00e0938a19f502fb220f62718 added one more binutils
tool: nm also needs a cross prefix.

---
 configure |    2 ++
 rules.mak |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
configure +2 -0
index 1a9daa5..5eb95a3 100755
@@ -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
rules.mak +1 -1
index 1d73293..cf76b88 100644
@@ -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}')
 
Signature · 1 line
1.7.10.4
#3 lore raw
Quoted 5 lines · Paolo Bonzini

Il 18/09/2014 22:07, Peter Maydell ha scritto:

Quoted 4 lines · Stefan Weil
Quoted 3 lines

Commit c261d774fb9093d00e0938a19f502fb220f62718 added one more binutils
tool: nm also needs a cross prefix.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Heh, completely missed that when reviewing the original patch.

Are you going to apply directly?

Yeah, sure.

-- PMM