diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2008-08-17 08:28:29 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2008-08-17 08:28:29 +0000 |
commit | fd711cd5429724ef427353a79bea7929d2ff75b0 (patch) | |
tree | 51c83cb4139f23ee657dbe68a3165c981f1aeffb /net/asterisk16 | |
parent | 510446b284e36f793a72193fc0ff9f3c20fe776c (diff) |
Make asterisk respect CFLAGS. This should fix numerous "undefined reference
to `__sync_xxx'" build errors reported by many people who have CPUTYPE set
to i686 and similar values in /etc/make.conf. The problem itself is related
to the fact that asterisk used FreeBSD CFLAGS when probing for gcc
capabilities during configure phase, while its own CFLAGS during actual
build. As a result, object code generated by gcc missed those functions.
Notes
Notes:
svn path=/head/; revision=218717
Diffstat (limited to 'net/asterisk16')
-rw-r--r-- | net/asterisk16/Makefile | 4 | ||||
-rw-r--r-- | net/asterisk16/files/codecnego-patch-Makefile | 12 | ||||
-rw-r--r-- | net/asterisk16/files/nocodecnego-patch-Makefile | 12 | ||||
-rw-r--r-- | net/asterisk16/files/patch-Makefile.rules | 21 |
4 files changed, 48 insertions, 1 deletions
diff --git a/net/asterisk16/Makefile b/net/asterisk16/Makefile index 876836cc48b1..f543d8c81f00 100644 --- a/net/asterisk16/Makefile +++ b/net/asterisk16/Makefile @@ -7,6 +7,7 @@ PORTNAME= asterisk PORTVERSION= 1.4.21.2 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://ftp.digium.com/pub/asterisk/ \ http://ftp.digium.com/pub/asterisk/old-releases/ @@ -37,7 +38,8 @@ MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ PWLIBDIR=${LOCALBASE}/share/pwlib \ OPENH323DIR=${LOCALBASE}/share/openh323 \ OSVERSION=${OSVERSION} \ - NOISY_BUILD=YES + NOISY_BUILD=YES \ + ASTCFLAGS="${CFLAGS}" MAN8= asterisk.8 astgenkey.8 autosupport.8 safe_asterisk.8 OPTIONS= OGGVORBIS "Enable Ogg Vorbis support" on \ diff --git a/net/asterisk16/files/codecnego-patch-Makefile b/net/asterisk16/files/codecnego-patch-Makefile index 1f127aa73b56..e6b6ac476b42 100644 --- a/net/asterisk16/files/codecnego-patch-Makefile +++ b/net/asterisk16/files/codecnego-patch-Makefile @@ -12,6 +12,18 @@ $FreeBSD$ else ASTVARLIBDIR=$(localstatedir)/lib/asterisk endif +@@ -214,9 +214,11 @@ + ASTLDFLAGS+=-L/usr/local/lib + endif + ++ifneq ($(OSARCH),FreeBSD) + ifneq ($(PROC),ultrasparc) + ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) + endif ++endif + + ifeq ($(PROC),ppc) + ASTCFLAGS+=-fsigned-char @@ -224,7 +224,7 @@ ifeq ($(OSARCH),FreeBSD) diff --git a/net/asterisk16/files/nocodecnego-patch-Makefile b/net/asterisk16/files/nocodecnego-patch-Makefile index 65610702890a..c325d81f10af 100644 --- a/net/asterisk16/files/nocodecnego-patch-Makefile +++ b/net/asterisk16/files/nocodecnego-patch-Makefile @@ -9,6 +9,18 @@ else ASTVARLIBDIR=$(localstatedir)/lib/asterisk endif +@@ -214,9 +214,11 @@ + ASTLDFLAGS+=-L/usr/local/lib + endif + ++ifneq ($(OSARCH),FreeBSD) + ifneq ($(PROC),ultrasparc) + ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) + endif ++endif + + ifeq ($(PROC),ppc) + ASTCFLAGS+=-fsigned-char @@ -224,7 +224,7 @@ ifeq ($(OSARCH),FreeBSD) diff --git a/net/asterisk16/files/patch-Makefile.rules b/net/asterisk16/files/patch-Makefile.rules new file mode 100644 index 000000000000..d129d9784b3c --- /dev/null +++ b/net/asterisk16/files/patch-Makefile.rules @@ -0,0 +1,21 @@ + +$FreeBSD$ + +--- Makefile.rules ++++ Makefile.rules +@@ -27,6 +27,7 @@ + CMD_PREFIX= + endif + ++ifneq ($(OSARCH),FreeBSD) + ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),) + # More GSM codec optimization + # Uncomment to enable MMXTM optimizations for x86 architecture CPU's +@@ -37,6 +38,7 @@ + OPTIMIZE?=-O6 + ASTCFLAGS+=$(OPTIMIZE) + endif ++endif + + %.o: %.c + $(ECHO_PREFIX) echo " [CC] $< -> $@" |