From 926cc924d2ef5ecdca09676e4a30ce717ff8f533 Mon Sep 17 00:00:00 2001 From: Jeff Peeler Date: Tue, 18 Aug 2009 20:59:32 +0000 Subject: [PATCH] Allow custom CPU optimization flags Added make variable LIBPRI_OPT to set optimization level. By default the optimization level is now set to -O2. (closes issue #12676) Reported by: tzafrir Patches: libpri_opt.diff uploaded by tzafrir (license 46) git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@976 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index beffe15..1cdaa3a 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ DYNAMIC_OBJS= \ rose_qsig_mwi.lo \ rose_qsig_name.lo \ version.lo -CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS) +CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS) $(LIBPRI_OPT) INSTALL_PREFIX=$(DESTDIR) INSTALL_BASE=/usr libdir?=$(INSTALL_BASE)/lib @@ -110,7 +110,9 @@ PRIVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .) #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesnt support it. ifeq ($(PROC),sparc64) PROC=ultrasparc -CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8 +LIBPRI_OPT = -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8 +else +LIBPRI_OPT = -O2 endif all: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)