mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
More Asterisk sparc patches (courtesy Belgarath)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
11
Makefile
11
Makefile
@@ -27,8 +27,15 @@ PROC=k8
|
||||
OPTIONS+=-m64
|
||||
endif
|
||||
ifeq ($(PROC),sparc64)
|
||||
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
|
||||
#This works for even old (2.96) versions of gcc and provides a small boost either way.
|
||||
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it.
|
||||
#So we go lowest common available by gcc and go a step down, still a step up from
|
||||
#the default as we now have a better instruction set to work with. - Belgarath
|
||||
PROC=ultrasparc
|
||||
CFLAGS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
|
||||
OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
|
||||
OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v8"; fi)
|
||||
OPTIONS+=-fomit-frame-pointer
|
||||
endif
|
||||
|
||||
endif
|
||||
@@ -55,7 +62,7 @@ PWD=$(shell pwd)
|
||||
#K6OPT = -DK6OPT
|
||||
|
||||
#Tell gcc to optimize the asterisk's code
|
||||
OPTIMIZE=-O6
|
||||
OPTIMIZE+=-O6
|
||||
|
||||
#Include debug symbols in the executables (-g) and profiling info (-pg)
|
||||
DEBUG=-g #-pg
|
||||
|
12
cdr/Makefile
12
cdr/Makefile
@@ -17,11 +17,23 @@ MODS=cdr_csv.so cdr_manager.so
|
||||
|
||||
CFLAGS+=-fPIC
|
||||
|
||||
PROC=$(shell uname -m)
|
||||
OSARCH=$(shell uname -s)
|
||||
|
||||
ifeq (${OSARCH},FreeBSD)
|
||||
SOLINK+=-L/usr/local/lib
|
||||
endif
|
||||
|
||||
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
|
||||
#This works for even old (2.96) versions of gcc and provides a small boost either way.
|
||||
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
|
||||
#So we go lowest common available by gcc and go a step down, still a step up from
|
||||
#the default as we now have a better instruction set to work with. - Belgarath
|
||||
ifeq ($(PROC),sparc64)
|
||||
PROC=ultrasparc
|
||||
CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
|
||||
endif
|
||||
|
||||
#
|
||||
# unixODBC stuff...
|
||||
#
|
||||
|
@@ -7,11 +7,15 @@
|
||||
#
|
||||
# Mark Spencer <markster@linux-support.net>
|
||||
#
|
||||
# Edited By Belgarath <> Aug 28 2004
|
||||
# Added bare bones ultrasparc-linux support.
|
||||
#
|
||||
# This program is free software, distributed under the terms of
|
||||
# the GNU General Public License
|
||||
#
|
||||
|
||||
OSARCH=$(shell uname -s)
|
||||
PROC=$(shell uname -m)
|
||||
|
||||
USE_MYSQL_FRIENDS=0
|
||||
USE_SIP_MYSQL_FRIENDS=0
|
||||
@@ -45,6 +49,12 @@ MYSQLLIB=-L/usr/lib/mysql -lmysqlclient
|
||||
PTLIB=-lpt_linux_x86_r
|
||||
H323LIB=-lh323_linux_x86_r
|
||||
CHANH323LIB=-ldl
|
||||
|
||||
ifeq ($(PROC),sparc64)
|
||||
PROC=ultrasparc
|
||||
CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
|
||||
endif
|
||||
|
||||
endif
|
||||
ifeq (${OSARCH},FreeBSD)
|
||||
PTLIB=-lpt_FreeBSD_x86_r
|
||||
|
@@ -3685,21 +3685,19 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, char *cmd, c
|
||||
} else {
|
||||
snprintf(invite, sizeof(invite), "sip:%s", p->tohost);
|
||||
}
|
||||
if (!ast_strlen_zero(p->extraparams)) {
|
||||
strncat(invite, ";", sizeof(invite) - strlen(invite));
|
||||
strncat(invite, p->extraparams, sizeof(invite) - strlen(invite));
|
||||
}
|
||||
strncpy(p->uri, invite, sizeof(p->uri) - 1);
|
||||
/* If there is a VXML URL append it to the SIP URL */
|
||||
if (vxml_url)
|
||||
{
|
||||
if (strlen(p->extraparams))
|
||||
snprintf(to, sizeof(to), "<%s;%s>;%s", invite, p->extraparams, vxml_url);
|
||||
else
|
||||
snprintf(to, sizeof(to), "<%s>;%s", invite, vxml_url);
|
||||
snprintf(to, sizeof(to), "<%s>;%s", invite, vxml_url);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strlen(p->extraparams))
|
||||
snprintf(to, sizeof(to), "<%s;%s>", invite, p->extraparams);
|
||||
else
|
||||
snprintf(to, sizeof(to), "<%s>", invite);
|
||||
snprintf(to, sizeof(to), "<%s>", invite);
|
||||
}
|
||||
memset(req, 0, sizeof(struct sip_request));
|
||||
init_req(req, cmd, invite);
|
||||
|
@@ -49,6 +49,15 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
|
||||
#This works for even old (2.96) versions of gcc and provides a small boost either way.
|
||||
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it.
|
||||
#So we go lowest common available by gcc and go a step down, still a step up from
|
||||
#the default as we now have a better instruction set to work with. - Belgarath
|
||||
ifeq (${PROC},ultrasparc)
|
||||
OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3 -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
PG =
|
||||
#PG = -g -pg
|
||||
######### Profiling flags. If you don't know what that means, leave it blank.
|
||||
|
@@ -31,8 +31,13 @@ ifneq ($(findstring BSD,${OSARCH}),BSD)
|
||||
ifneq ($(PROC),ppc)
|
||||
ifneq ($(PROC),x86_64)
|
||||
ifneq ($(PROC),alpha)
|
||||
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
|
||||
#This works for even old (2.96) versions of gcc and provides a small boost either way.
|
||||
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
|
||||
#So we go lowest common available by gcc and go a step down, still a step up from
|
||||
#the default as we now have a better instruction set to work with. - Belgarath
|
||||
ifeq ($(PROC),ultrasparc)
|
||||
CFLAGS+= -mtune=$(PROC)
|
||||
CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer
|
||||
else
|
||||
CFLAGS+= -march=$(PROC)
|
||||
endif
|
||||
|
@@ -7,6 +7,12 @@ SOVER=2.1
|
||||
else
|
||||
SOVER=2
|
||||
endif
|
||||
#Added support for UltraSparc - Belgarath
|
||||
ifeq ($(ARCH),sparc64)
|
||||
PROC=ultrasparc
|
||||
CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
|
||||
endif
|
||||
|
||||
LIBDBSO=libdb.so.$(SOVER)
|
||||
PROG= db_dump185
|
||||
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
|
||||
|
Reference in New Issue
Block a user