ports/88574: [PATCH][amd64] Fix build of net/asterisk on amd64

David Taylor davidt at yadt.co.uk
Sun Nov 6 22:30:18 UTC 2005


>Number:         88574
>Category:       ports
>Synopsis:       [PATCH][amd64] Fix build of net/asterisk on amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 06 22:30:17 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     David Taylor
>Release:        FreeBSD 6.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD outcold.yadt.co.uk 6.0-STABLE FreeBSD 6.0-STABLE #1: Sat Nov 5 22:05:07 GMT 2005 davidt at outcold.yadt.co.uk:/usr/obj/repo/FreeBSD/FreeBSD-6.x/src/sys/OUTCOLD amd64


>Description:

Currently, asterisk fails to build on amd64, as the Makefile only has
the necessary magic to convert "x86_64" on Linux to "--march=k8".

This patch adds amd64 to ONLY_FOR_ARCHS, and copies the Linux magic,
changing x86_64 to athlon64, as reported by uname -p.

After this change, asterisk certainly builds fine, although I have not
yet set up VoIP to test it.

>How-To-Repeat:

N/A

>Fix:

Index: asterisk/Makefile
===================================================================
RCS file: /home/ncvs/ports/net/asterisk/Makefile,v
retrieving revision 1.40
diff -u -r1.40 Makefile
--- asterisk/Makefile	6 Sep 2005 16:47:35 -0000	1.40
+++ asterisk/Makefile	6 Nov 2005 22:08:46 -0000
@@ -27,7 +27,7 @@
 		newt.51:${PORTSDIR}/devel/newt
 RUN_DEPENDS=	mpg123:${PORTSDIR}/audio/mpg123
 
-ONLY_FOR_ARCHS=	i386 sparc64
+ONLY_FOR_ARCHS=	i386 sparc64 amd64
 
 BRIVER=		bristuff-0.2.0-RC8h
 GNU_CONFIGURE=	yes
Index: asterisk/files/patch-Makefile
===================================================================
RCS file: /home/ncvs/ports/net/asterisk/files/patch-Makefile,v
retrieving revision 1.10
diff -u -r1.10 patch-Makefile
--- asterisk/files/patch-Makefile	14 Aug 2005 18:44:06 -0000	1.10
+++ asterisk/files/patch-Makefile	6 Nov 2005 22:14:54 -0000
@@ -1,10 +1,14 @@
 --- Makefile.orig	Tue Aug  9 17:18:53 2005
 +++ Makefile	Tue Aug  9 17:33:29 2005
-@@ -45,6 +45,15 @@
+@@ -45,6 +45,19 @@
  PROC=$(shell uname -m)
  endif
  
 +ifeq (${OSARCH},FreeBSD)
++ifeq ($(PROC),amd64)
++PROC=k8
++OPTIONS+=-m64
++endif
 +ifeq ($(PROC),sparc64)
 +PROC=ultrasparc
 +OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list