From d7aead737dfb89adb6052824e1d96ddef89bd0e1 Mon Sep 17 00:00:00 2001
From: "Kevin P. Fleming" <kpfleming@digium.com>
Date: Sun, 30 Apr 2006 14:28:25 +0000
Subject: [PATCH] Merged revisions 23673 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r23673 | kpfleming | 2006-04-30 09:27:56 -0500 (Sun, 30 Apr 2006) | 2 lines

allow top-level OPTIMIZE setting to affect builds in these subdirectories too

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 Makefile           | 4 ++--
 cdr/Makefile       | 2 +-
 channels/Makefile  | 2 +-
 db1-ast/Makefile   | 2 +-
 editline/configure | 2 --
 5 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 6c047d69df..8c9e773028 100644
--- a/Makefile
+++ b/Makefile
@@ -464,10 +464,10 @@ all: TAGS
 endif
 
 editline/config.h:
-	cd editline && unset CFLAGS LIBS && ./configure ; \
+	cd editline && unset CFLAGS LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
 
 editline/libedit.a:
-	cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
+	cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
 	$(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a:
diff --git a/cdr/Makefile b/cdr/Makefile
index 137598011f..ccce4d4844 100644
--- a/cdr/Makefile
+++ b/cdr/Makefile
@@ -20,7 +20,7 @@ MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.c,%.so,$(wildcard cdr_*.c)))
 #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
+  CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
 endif
 
 ifneq ($(TDS_LIB),)
diff --git a/channels/Makefile b/channels/Makefile
index e5fe3c062d..aca979f52f 100644
--- a/channels/Makefile
+++ b/channels/Makefile
@@ -26,7 +26,7 @@ endif
 
 ifeq ($(PROC),sparc64)
   PROC=ultrasparc
-  CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
+  CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
 endif
 
 ifeq ($(OSARCH),FreeBSD)
diff --git a/db1-ast/Makefile b/db1-ast/Makefile
index 3d218c25ac..88273a0a97 100644
--- a/db1-ast/Makefile
+++ b/db1-ast/Makefile
@@ -10,7 +10,7 @@ endif
 #Added support for UltraSparc - Belgarath
 ifeq ($(ARCH),sparc64)
 PROC=ultrasparc
-CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
+CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
 endif
 
 ifeq ($(OSARCH),Darwin)
diff --git a/editline/configure b/editline/configure
index 7265fe0200..8f9075c5f9 100755
--- a/editline/configure
+++ b/editline/configure
@@ -1923,8 +1923,6 @@ fi
 if test "x$enable_debug" = "xyes" ; then
   CPPFLAGS="$CPPFLAGS -DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG"
   CPPFLAGS="$CPPFLAGS -DDEBUG_REFRESH -DDEBUG_PASTE"
-else
-  CFLAGS="$CFLAGS -O"
 fi
 
 
-- 
GitLab