aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild_tools/strip_nonapi11
-rw-r--r--main/Makefile2
2 files changed, 11 insertions, 2 deletions
diff --git a/build_tools/strip_nonapi b/build_tools/strip_nonapi
index c2262cafa..ba7482983 100755
--- a/build_tools/strip_nonapi
+++ b/build_tools/strip_nonapi
@@ -15,11 +15,20 @@
# astman_
# pbx_
+case "${PROC}" in
+ powerpc64)
+ TEXTSYM=" D "
+ ;;
+ *)
+ TEXTSYM=" T "
+ ;;
+esac
+
FILTER="${GREP} -v -e ^ast_ -e ^_ast_ -e ^__ast_ -e ^astman_ -e ^pbx_"
case "${OSARCH}" in
linux-gnu)
- nm ${1} | ${GREP} -e " T " | cut -d" " -f3 | ${FILTER} > striplist
+ nm ${1} | ${GREP} -e "$TEXTSYM" | cut -d" " -f3 | ${FILTER} > striplist
sed -e "s/^/-N /" striplist | xargs ${STRIP} ${1}
rm -f striplist
;;
diff --git a/main/Makefile b/main/Makefile
index 204e7dff6..c9de88273 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -146,7 +146,7 @@ ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)
else
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS)
endif
- @$(ASTTOPDIR)/build_tools/strip_nonapi $@
+ $(CMD_PREFIX) $(ASTTOPDIR)/build_tools/strip_nonapi $@ || rm $@
clean::
rm -f asterisk