[PATCH] make: pie -- Use CROSS_COMPILE prefix for nm utility
Cyrill Gorcunov
gorcunov at openvz.org
Thu May 30 05:55:24 EDT 2013
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
pie/Makefile | 2 +-
pie/gen-offsets.sh | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/pie/Makefile b/pie/Makefile
index e912ab4..52e5eb0 100644
--- a/pie/Makefile
+++ b/pie/Makefile
@@ -38,7 +38,7 @@ $(obj)/%.built-in.bin: $(obj)/%.built-in.bin.o
$(obj)/%-blob.h: $(obj)/%.built-in.bin $(obj)/$(GEN-OFFSETS)
$(E) " GEN " $@
- $(Q) $(SH) $(obj)/$(GEN-OFFSETS) $(@:-blob.h=) $(notdir $(@:-blob.h=)) > $@
+ $(Q) $(SH) $(obj)/$(GEN-OFFSETS) $(@:-blob.h=) $(notdir $(@:-blob.h=)) $(CROSS_COMPILE) > $@
$(BLOBS): $(obj)/$(PIELDS)
_all += $(BLOBS)
diff --git a/pie/gen-offsets.sh b/pie/gen-offsets.sh
index 99af519..53f2245 100644
--- a/pie/gen-offsets.sh
+++ b/pie/gen-offsets.sh
@@ -5,6 +5,11 @@ set -u
FILE=$1
NAME=$2
+
+if test $# -ge 3; then
+CROSS_COMPILE=$3
+fi
+
INC_GUARD=__${NAME}_h__
PREFIX=${NAME}_blob_offset__
BLOB=${NAME}_blob
@@ -20,7 +25,7 @@ cat << EOF
EOF
-nm $OBJNAME | grep "__export_" | tr . _ | awk "$AWK_CMD"
+$(CROSS_COMPILE)nm $OBJNAME | grep "__export_" | tr . _ | awk "$AWK_CMD"
cat << EOF
--
1.8.1.4
--8GpibOaaTibBMecb--
More information about the CRIU
mailing list