[Asterisk-Dev] Problem with asterisk/codecs/gsm/Makefile asterisk/codecs/mp3

Scott Lambert lambert at lambertfam.org
Thu Oct 16 14:22:43 MST 2003


scott at DellBSD.inch.com ~/src/VENDOR/digium/asterisk/codecs/gsm
16:56:52 Thu Oct 16 $ gmake
gcc  -march= -fomit-frame-pointer   -c -DNeedFunctionPrototypes=1 -funroll-loops -fPIC -DSASR -DNDEBUG    -DWAV49   -I./inc src/add.c
cc1: bad value () for -march= switch
gmake: *** [src/add.o] Error 1

I don't see where PROC is set except in asterisk/Makefile, and that is
commented out.  This is probably not the right fix but it works for me
on FreeBSD 4.8-RELEASE-p13.

 +--------- Asterisk Build Complete ---------+
 + Asterisk has successfully been built, but +
 + cannot be run before being installed by   +
 + running:                                  +
 +                                           +
 +               gmake install                +
 +-------------------------------------------+

Patches attached.

-- 
Scott Lambert                    KC5MLE                       Unix SysAdmin
lambert at lambertfam.org      

-------------- next part --------------
--- Makefile.cvs	Thu Oct 16 17:13:39 2003
+++ Makefile	Thu Oct 16 17:14:31 2003
@@ -25,9 +25,11 @@
 CFLAGS = $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC
 #CFLAGS+= $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi)
 
+ifdef PROC
 #fix for PPC processors
 ifneq ($(PROC),ppc)
 	CFLAGS+= -march=$(PROC)
+endif
 endif
 
 LIB = $(LIB_TARGET_DIR)/liblpc10.a
-------------- next part --------------
--- Makefile.orig	Tue Oct 14 17:39:38 2003
+++ Makefile	Thu Oct 16 17:08:12 2003
@@ -1,7 +1,10 @@
 #
 # LMC section
 
-CFLAGS+= -I../include -Iinclude -O3 -march=$(PROC) -funroll-loops -Wall -Wno-missing-prototypes -Wno-missing-declarations -g -fPIC
+CFLAGS+= -I../include -Iinclude -O3 -funroll-loops -Wall -Wno-missing-prototypes -Wno-missing-declarations -g -fPIC
+ifdef PROC
+CFLAGS+= -march=$(PROC)
+endif
 RANLIB=ranlib
 
 # the XING decoder objs and dependencies:
-------------- next part --------------
--- Makefile.cvs	Thu Oct 16 16:56:46 2003
+++ Makefile	Thu Oct 16 17:01:06 2003
@@ -54,7 +54,10 @@
 # CC		= /usr/lang/acc
 # CCFLAGS 	= -c -O
 
-CC		= gcc $(OPTIMIZE) -march=$(PROC) -fomit-frame-pointer 
+CC		= gcc $(OPTIMIZE) -fomit-frame-pointer 
+ifdef $(PROC)
+CC		+= -march=$(PROC) 
+endif
 CCFLAGS 	+= -c -DNeedFunctionPrototypes=1 -funroll-loops -fPIC
 
 LD 		= $(CC)


More information about the asterisk-dev mailing list