From 260291b77249c06dcf959f18e226b3dcdb55718d Mon Sep 17 00:00:00 2001 From: Jeffrey C. Ollie Date: Feb 27 2008 22:12:02 +0000 Subject: Add patch to fix building on PPC64. --- diff --git a/asterisk-1.4.18-funcdesc.patch b/asterisk-1.4.18-funcdesc.patch new file mode 100644 index 0000000..e4d6073 --- /dev/null +++ b/asterisk-1.4.18-funcdesc.patch @@ -0,0 +1,60 @@ +From 0d18b1b78dbae3d548192883a858838bbc23011a Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Wed, 27 Feb 2008 14:54:45 -0600 +Subject: [PATCH] Fix building on PPC64. + +1. build_tools/strip_nonapi was looking at the wrong output from + nm(1). This is fixed by checking for a PPC64 processor and + adjusting. + +2. Makefile would always hide the execution of + build_tools/strip_nonapi which made it difficult to diagnose the + problem. Now when NOISY_BUILD is enabled you'll be able to see the + execution of the script. +--- + build_tools/strip_nonapi | 11 ++++++++++- + main/Makefile | 2 +- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/build_tools/strip_nonapi b/build_tools/strip_nonapi +index c2262ca..91e41aa 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 204e7df..c9de882 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 +-- +1.5.4.1 + diff --git a/asterisk.spec b/asterisk.spec index 5cb778e..cb5225c 100644 --- a/asterisk.spec +++ b/asterisk.spec @@ -3,14 +3,11 @@ Summary: The Open Source PBX Name: asterisk Version: 1.4.18 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: Applications/Internet URL: http://www.asterisk.org/ -# will file a bug once the asterisk bugzilla component shows up -ExcludeArch: ppc64 - # The asterisk tarball contains some items that we don't want in there, # so start with the original tarball from here: # http://downloads.digium.com/pub/telephony/asterisk/releases/asterisk-%{version}.tar.gz @@ -43,6 +40,7 @@ Patch6: asterisk-1.4.18-alternate-extensions.patch Patch7: asterisk-1.4.18-optimization.patch Patch8: asterisk-1.4.18-chanmobile.patch Patch9: asterisk-1.4.18-autoconf.patch +Patch10: asterisk-1.4.18-funcdesc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) @@ -333,6 +331,7 @@ Modules for Asterisk that use Zaptel. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 cp %{SOURCE2} menuselect.makedeps cp %{SOURCE3} menuselect.makeopts @@ -901,6 +900,9 @@ fi %{_libdir}/asterisk/modules/codec_zap.so %changelog +* Wed Feb 27 2008 - 1.4.18-2 +- Add patch from David Woodhouse to fix building on PPC64. + * Wed Feb 13 2008 Jeffrey C. Ollie - 1.4.18-1 - Update to 1.4.18. - Use -march=i486 on i386 builds for atomic operations (GCC 4.3