tomh / rpms / asterisk

Forked from rpms/asterisk 6 years ago
Clone
e44837e
From f3359ab4608ea90ac03dd90f5e7249256c107dcc Mon Sep 17 00:00:00 2001
99ab4c8
From: Jeffrey C. Ollie <jcollie@pc21224.campus.dmacc.edu>
99ab4c8
Date: Thu, 8 Nov 2007 16:42:14 -0600
99ab4c8
Subject: [PATCH] Pick proper optimization flags for Fedora.
99ab4c8
99ab4c8
---
99ab4c8
 Makefile |   16 ++++++++++++----
99ab4c8
 1 files changed, 12 insertions(+), 4 deletions(-)
99ab4c8
99ab4c8
diff --git a/Makefile b/Makefile
e44837e
index 5343672..e932f90 100644
99ab4c8
--- a/Makefile
99ab4c8
+++ b/Makefile
e44837e
@@ -198,10 +198,16 @@ ifeq ($(OSARCH),linux-gnu)
99ab4c8
 endif
99ab4c8
 
99ab4c8
 ifeq ($(findstring -save-temps,$(ASTCFLAGS)),)
99ab4c8
-ASTCFLAGS+=-pipe
99ab4c8
+  ifeq ($(findstring -pipe,$(ASTCFLAGS)),)
99ab4c8
+    ASTCFLAGS+=-pipe
99ab4c8
+  endif
99ab4c8
+endif
99ab4c8
+
99ab4c8
+ifeq ($(findstring -Wall,$(ASTCFLAGS)),)
99ab4c8
+  ASTCFLAGS+=-Wall
99ab4c8
 endif
99ab4c8
 
99ab4c8
-ASTCFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
99ab4c8
+ASTCFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
99ab4c8
 
99ab4c8
 ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
99ab4c8
 
e44837e
@@ -214,8 +220,10 @@ ifneq ($(findstring BSD,$(OSARCH)),)
99ab4c8
   ASTLDFLAGS+=-L/usr/local/lib
99ab4c8
 endif
99ab4c8
 
99ab4c8
-ifneq ($(PROC),ultrasparc)
99ab4c8
-  ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
99ab4c8
+ifeq ($(findstring -march,$(ASTCFLAGS)),)
99ab4c8
+  ifneq ($(PROC),ultrasparc)
99ab4c8
+    ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
99ab4c8
+  endif
99ab4c8
 endif
99ab4c8
 
99ab4c8
 ifeq ($(PROC),ppc)
99ab4c8
-- 
e44837e
1.5.4.1
99ab4c8