00eee17
From: Peter Lemenkov <lemenkov@gmail.com>
00eee17
Date: Fri, 13 Jan 2017 14:24:36 +0300
00eee17
Subject: [PATCH] Dont' try modifying CFLAGS
00eee17
00eee17
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
00eee17
00eee17
diff --git a/Makefile.defs b/Makefile.defs
5b74c2b
index 395109c..169ec7f 100644
00eee17
--- a/Makefile.defs
00eee17
+++ b/Makefile.defs
5b74c2b
@@ -763,526 +763,8 @@ endif
5b74c2b
 CFLAGS=$(shell echo "$${CFLAGS}")
5b74c2b
 LDFLAGS+=
00eee17
 
5b74c2b
-ifneq (,$(findstring DBG_MALLOC, $(DEFS)))
5b74c2b
-	CC_OPTIMIZE_FLAG?=-O0
5b74c2b
-endif
5b74c2b
-
5b74c2b
-ifeq	($(CC_NAME), gcc)
5b74c2b
-	CC_OPTIMIZE_FLAG?=-O9
5b74c2b
-endif
5b74c2b
-ifeq	($(CC_NAME), icc)
5b74c2b
-	CC_OPTIMIZE_FLAG?=-O3
5b74c2b
-endif
5b74c2b
-ifeq	($(CC_NAME), clang)
5b74c2b
-	CC_OPTIMIZE_FLAG?=-O3
5b74c2b
-endif
5b74c2b
-
00eee17
 ifeq (,$(CFLAGS))
00eee17
 
00eee17
-#common stuff
00eee17
-CFLAGS+=$(DEBUGSYM)
00eee17
-
00eee17
-# setting more CFLAGS
00eee17
-ifeq ($(mode), release)
00eee17
-
00eee17
-#if i386
00eee17
-ifeq	($(ARCH), i386)
00eee17
-	# These CPU optimization assumes that you run a Intel processor.
00eee17
-	# If you use a AMD CPU, you could ajust the settings here for better
00eee17
-	# performance. For gcc 4.x use CPU_TYPE ?= athlon-xp
00eee17
-		# if gcc
00eee17
-ifeq		($(CC_NAME), gcc)
00eee17
-				#common stuff
00eee17
-				CFLAGS+=-m32 $(CC_OPTIMIZE_FLAG) -funroll-loops  -Wcast-align $(PROFILE) \
00eee17
-					-Wall
00eee17
-				LDFLAGS+=-m32
00eee17
-			#if gcc 4.0+
00eee17
-ifeq			($(CC_CLASS), 4.x)
00eee17
-					ARCH_VER=$(shell $(GETARCH))
00eee17
-ifeq 				($(ARCH_VER), i386)
00eee17
-						CPU_TYPE ?= i686
00eee17
-else
00eee17
-						CPU_TYPE ?= prescott
00eee17
-endif
00eee17
-					CFLAGS+=-minline-all-stringops \
00eee17
-							-falign-loops \
00eee17
-							-ftree-vectorize \
00eee17
-							-mtune=$(CPU_TYPE) \
00eee17
-					-Wold-style-definition -Wmissing-field-initializers -Wredundant-decls
00eee17
-
00eee17
-else
00eee17
-			#if gcc 3.0+
00eee17
-ifeq			($(CC_CLASS), 3.x)
00eee17
-					CPU_TYPE ?= pentium4
00eee17
-					CFLAGS+=-minline-all-stringops \
00eee17
-							-falign-loops
00eee17
-ifeq				(X,$(shell echo "$(CC_SHORTVER)" | sed -e 's/3\.[0-3]/X/'))
00eee17
-					CFLAGS+=-mcpu=$(CPU_TYPE)
00eee17
-else
00eee17
-					CFLAGS+=-mtune=$(CPU_TYPE)
00eee17
-endif
00eee17
-else
00eee17
-ifeq			($(CC_CLASS), 2.9x) #older gcc version (2.9[1-5])
00eee17
-$(warning 			Old gcc detected ($(CC_SHORTVER)), use  gcc >= 3.1 \
00eee17
-					for better results)
00eee17
-
00eee17
-					CFLAGS+=-m486 \
00eee17
-							-malign-loops=4
00eee17
-else
00eee17
-				#really old version
00eee17
-$(warning			You are using an old and unsupported gcc \
00eee17
-					 version  ($(CC_SHORTVER)), compile at your own risk!)
00eee17
-
00eee17
-endif			# CC_CLASS, 2.9x
00eee17
-endif			# CC_CLASS, 3.x
00eee17
-endif			# CC_CLASS, 4.x
00eee17
-
00eee17
-else		# CC_NAME, gcc
00eee17
-ifeq		($(CC_NAME), icc)
00eee17
-			CFLAGS+=$(CC_OPTIMIZE_FLAG)  -ipo -ipo_obj -unroll  $(PROFILE) \
00eee17
-					 -tpp6 -xK  #-openmp  #optimize for PIII
00eee17
-				# -prefetch doesn't seem to work
00eee17
-				#( ty to inline acroos files, unroll loops,prefetch,
00eee17
-				# optimize for PIII, use PIII instructions & vect.,
00eee17
-				# mutlithread loops)
00eee17
-else		#CC_NAME, icc
00eee17
-ifeq		($(CC_NAME), suncc)
00eee17
-			CFLAGS+=-xO5 -fast -native -xCC \
00eee17
-					-xc99=no_lib # C99 support
00eee17
-			# -Dinline="" # add this if cc < 5.3 (define inline as null)
00eee17
-else
00eee17
-ifeq		($(CC_NAME), clang)
00eee17
-			CFLAGS+=$(CC_OPTIMIZE_FLAG) -funroll-loops
00eee17
-else
00eee17
-				#other compilers
00eee17
-$(error 			Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
00eee17
-endif		#CC_NAME, clang
00eee17
-endif		#CC_NAME, suncc
00eee17
-endif		#CC_NAME, icc
00eee17
-endif		#CC_NAME, gcc
00eee17
-endif	#ARCH, i386
00eee17
-
00eee17
-#x86_64
00eee17
-ifeq	($(ARCH), x86_64)
00eee17
-	# These CPU optimization assumes that you run a Intel 64 processor.
00eee17
-	# If you use a AMD 64 CPU, you could ajust the settings here for better
00eee17
-	# performance. For gcc 4.x use CPU_TYPE ?= athlon64
00eee17
-	# Perhaps it makes sense to use '-m64' here?
00eee17
-		# if gcc
00eee17
-ifeq		($(CC_NAME), gcc)
00eee17
-				#common stuff
00eee17
-				CFLAGS+=$(CC_OPTIMIZE_FLAG) -funroll-loops  -Wcast-align $(PROFILE) \
00eee17
-					-Wall
00eee17
-			#if gcc 4.0+
00eee17
-ifeq			($(CC_CLASS), 4.x)
00eee17
-					CPU_TYPE ?= nocona
00eee17
-					CFLAGS+=-minline-all-stringops \
00eee17
-							-falign-loops \
00eee17
-							-ftree-vectorize \
00eee17
-							-mtune=$(CPU_TYPE) \
00eee17
-					-Wold-style-definition -Wmissing-field-initializers -Wredundant-decls
00eee17
-else
00eee17
-			#if gcc 3.0+
00eee17
-ifeq			($(CC_CLASS), 3.x)
00eee17
-					CPU_TYPE ?= nocona
00eee17
-					CFLAGS+=-minline-all-stringops \
00eee17
-							-falign-loops \
00eee17
-							-mtune=$(CPU_TYPE)
00eee17
-else
00eee17
-ifeq			($(CC_CLASS), 2.9x) #older gcc version (2.9[1-5])
00eee17
-$(warning 			Old gcc detected ($(CC_SHORTVER)), use  gcc >= 3.1 \
00eee17
-					for better results)
00eee17
-
00eee17
-					CFLAGS+=-m486 \
00eee17
-							-malign-loops=4
00eee17
-else
00eee17
-				#really old version
00eee17
-$(warning			You are using an old and unsupported gcc \
00eee17
-					 version  ($(CC_SHORTVER)), compile at your own risk!)
00eee17
-
00eee17
-endif			# CC_CLASS, 2.9x
00eee17
-endif			# CC_CLASS, 3.x
00eee17
-endif			# CC_CLASS, 4.x
00eee17
-
00eee17
-else		# CC_NAME, gcc
00eee17
-ifeq		($(CC_NAME), icc)
00eee17
-			CFLAGS+=$(CC_OPTIMIZE_FLAG) -ipo -ipo_obj -unroll  $(PROFILE) \
00eee17
-					 -tpp6 -xK  #-openmp  #optimize for PIII
00eee17
-				# -prefetch doesn't seem to work
00eee17
-				#( ty to inline acroos files, unroll loops,prefetch,
00eee17
-				# optimize for PIII, use PIII instructions & vect.,
00eee17
-				# mutlithread loops)
00eee17
-else
00eee17
-ifeq		($(CC_NAME), suncc)
00eee17
-			CFLAGS+=-xO5 -fast -native -xCC \
00eee17
-				-xc99=no_lib # C99 support
00eee17
-				# -Dinline="" # add this if cc < 5.3 (define inline as null)
00eee17
-else
00eee17
-ifeq		($(CC_NAME), clang)
00eee17
-			CFLAGS+=$(CC_OPTIMIZE_FLAG) -funroll-loops
00eee17
-else
00eee17
-				#other compilers
00eee17
-$(error 			Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
00eee17
-endif		#CC_NAME, clang
00eee17
-endif		#CC_NAME, icc
00eee17
-endif		#CC_NAME, gcc
00eee17
-endif		#CC_NAME, suncc
00eee17
-endif	#ARCH, x86_64
00eee17
-
00eee17
-	#if sparc
00eee17
-ifeq	($(ARCH), sparc64)
00eee17
-			#if gcc
00eee17
-ifeq		($(CC_NAME), gcc)
00eee17
-				#common stuff
00eee17
-				CFLAGS+=$(CC_OPTIMIZE_FLAG) -funroll-loops  $(PROFILE) \
00eee17
-					-Wall\
00eee17
-					#-Wcast-align \
00eee17
-					#-Wmissing-prototypes
00eee17
-				#if gcc 4.x
00eee17
-ifeq			($(CC_CLASS), 4.x)
00eee17
-
00eee17
-					# Processors of Family UltraSparc II
00eee17
-					ifeq ($(CHIP), ultrasparc-ii)
00eee17
-						CFLAGS+= -ftree-vectorize -mcpu=ultrasparc -mtune=ultrasparc -mvis
00eee17
-					endif
00eee17
-
00eee17
-					# Processors of Family UltraSparc III (III, III, IIIi, IIICu)
00eee17
-					ifeq ($(CHIP), ultrasparc-iiii)
00eee17
-						CFLAGS+= -ftree-vectorize -mcpu=ultrasparc3 -mtune=ultrasparc3 -mvis
00eee17
-					endif
00eee17
-
00eee17
-					ifeq ($(CHIP), ultrasparc-iii)
00eee17
-						CFLAGS+= -ftree-vectorize -mcpu=ultrasparc3 -mtune=ultrasparc3 -mvis
00eee17
-					endif
00eee17
-
00eee17
-					ifeq ($(CHIP), ultrasparc-iiicu)
00eee17
-						CFLAGS+= -ftree-vectorize -mcpu=ultrasparc3 -mtune=ultrasparc3 -mvis
00eee17
-					endif
00eee17
-
00eee17
-					# Processors of Family UltraSparc T1
00eee17
-					ifeq ($(CHIP), ultrasparc-t1)
00eee17
-						# niagara switch is not supported on GCC < 4.2
00eee17
-						# Sets to default ultrasparc
00eee17
-						ifeq ($(CC_SHORTVER), 4.2)
00eee17
-							CFLAGS+= -ftree-vectorize -mcpu=niagara -mtune=niagara -mvis
00eee17
-						else
00eee17
-							ifeq ($(CC_SHORTVER), 4.3)
00eee17
-								CFLAGS+= -ftree-vectorize -mcpu=niagara -mtune=niagara -mvis
00eee17
-							else
00eee17
-								CFLAGS+= -ftree-vectorize -mcpu=ultrasparc -mtune=ultrasparc -mvis
00eee17
-							endif
00eee17
-						endif
00eee17
-					endif
00eee17
-
00eee17
-					# If processor detection fails, defaults to UltraSPARC without VIS
00eee17
-					ifeq (,$(CHIP))
00eee17
-						#CPU_TYPE=ultrasparc
00eee17
-						CFLAGS += -mcpu=ultrasparc -mtune=ultrasparc
00eee17
-					endif
00eee17
-
00eee17
-					# use -m64 to force 64 bit (but add it also to LDFLAGS),
00eee17
-					# -m32 for 32 bit (default on solaris),
00eee17
-					# nothing for arch. default
00eee17
-					# -mcpu=v9 or ultrasparc? # -mtune implied by -mcpu
00eee17
-					#-mno-epilogue #try to inline function exit code
00eee17
-					#-mflat # omit save/restore
00eee17
-					#-,faster-structs #faster non Sparc ABI structure copy ops
00eee17
-
00eee17
-else
00eee17
-				#if gcc 3.0+
00eee17
-ifeq			($(CC_CLASS), 3.x)
00eee17
-
00eee17
-					# Processors of Family UltraSparc II
00eee17
-					ifeq ($(CHIP), ultrasparc-ii)
00eee17
-						#CPU_TYPE=ultrasparc
00eee17
-						CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc -mvis
00eee17
-					endif
00eee17
-
00eee17
-					# Processors of Family UltraSparc III
00eee17
-					ifeq ($(CHIP), ultrasparc-iiii)
00eee17
-						CFLAGS+= -mcpu=ultrasparc3 -mtune=ultrasparc3 -mvis
00eee17
-					endif
00eee17
-
00eee17
-					ifeq ($(CHIP), ultrasparc-iiii)
00eee17
-						CFLAGS+= -mcpu=ultrasparc3 -mtune=ultrasparc3 -mvis
00eee17
-					endif
00eee17
-
00eee17
-					ifeq ($(CHIP), ultrasparc-iiicu)
00eee17
-						CFLAGS+= -mcpu=ultrasparc3 -mtune=ultrasparc3 -mvis
00eee17
-					endif
00eee17
-
00eee17
-					# Processors of Family UltraSparc T1
00eee17
-					ifeq ($(CHIP), ultrasparc-t1)
00eee17
-						# niagara switch is not supported on GCC < 4.2
00eee17
-						# Sets to default ultrasparc
00eee17
-						CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc -mvis
00eee17
-					endif
00eee17
-
00eee17
-					# If processor detection fails, defaults to UltraSPARC without VIS
00eee17
-					ifeq (,$(CHIP))
00eee17
-						#CPU_TYPE=ultrasparc
00eee17
-						CFLAGS += -mcpu=ultrasparc -mtune=ultrasparc
00eee17
-					endif
00eee17
-
00eee17
-					# use -m64 to force 64 bit (but add it also to LDFLAGS),
00eee17
-					# -m32 for 32 bit (default on solaris),
00eee17
-					# nothing for arch. default
00eee17
-					# -mcpu=v9 or ultrasparc? # -mtune implied by -mcpu
00eee17
-					#-mno-epilogue #try to inline function exit code
00eee17
-					#-mflat # omit save/restore
00eee17
-					#-,faster-structs #faster non Sparc ABI structure copy ops
00eee17
-
00eee17
-else			# CC_CLASS, 3.0
00eee17
-ifeq			($(CC_CLASS), 2.9x) #older gcc version (2.9[1-5])
00eee17
-$(warning 			Old gcc detected ($(CC_SHORTVER)), use  gcc >= 3.1 \
00eee17
-					for better results)
00eee17
-ifneq				($(OS), netbsd)
00eee17
-						# on netbsd/sparc64,  gcc 2.95.3 does not compile
00eee17
-						# opensips with -mv8
00eee17
-						CFLAGS+= -mv8
00eee17
-endif
00eee17
-ifeq					($(ASTYPE), solaris)
00eee17
-							CFLAGS+= -Wa,-xarch=v8plus
00eee17
-endif
00eee17
-else			#CC_CLASS, 2.9x
00eee17
-				#really old version
00eee17
-$(warning			You are using an old and unsupported gcc \
00eee17
-					 version ($(CC_SHORTVER)), compile at your own risk!)
00eee17
-
00eee17
-					CFLAGS+= -mv8
00eee17
-ifeq					($(ASTYPE), solaris)
00eee17
-							CFLAGS+= -Wa,-xarch=v8plus
00eee17
-endif
00eee17
-
00eee17
-endif			#CC_CLASS, 2.9x
00eee17
-endif			#CC_CLASS, 3.x
00eee17
-endif			#CC_CLASS, 4.x
00eee17
-
00eee17
-else		#CC_NAME, gcc
00eee17
-ifeq		($(CC_NAME), suncc)
00eee17
-			CFLAGS+=-xO5 -fast -native -xarch=v8plusa -xCC \
00eee17
-					-xc99=no_lib # C99 support
00eee17
-			# -Dinline="" # add this if cc < 5.3 (define inline as null)
00eee17
-else
00eee17
-				#other compilers
00eee17
-$(error 			Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
00eee17
-endif		#CC_NAME, suncc
00eee17
-endif		#CC_NAME, gcc
00eee17
-endif	#ARCH, sparc64
00eee17
-
00eee17
-	#if ipaq/netwinder
00eee17
-ifeq	($(ARCH), arm)
00eee17
-		# if gcc
00eee17
-ifeq		($(CC_NAME), gcc)
00eee17
-				#common stuff
00eee17
-				CFLAGS+=$(CC_OPTIMIZE_FLAG) -funroll-loops  -Wcast-align $(PROFILE) \
00eee17
-					-Wall -marm
00eee17
-			#if gcc 4.x+
00eee17
-ifeq			($(CC_CLASS), 4.x)
00eee17
-					CFLAGS+=-mcpu=strongarm1100 -minline-all-stringops \
00eee17
-							-ftree-vectorize
00eee17
-else
00eee17
-			#if gcc 3.0+
00eee17
-ifeq			($(CC_CLASS), 3.x)
00eee17
-					CFLAGS+= -mcpu=strongarm1100
00eee17
-else
00eee17
-ifeq			($(CC_CLASS), 2.9x) #older gcc version (2.9[1-5])
00eee17
-$(warning 			Old gcc detected ($(CC_SHORTVER)), use  gcc 3.0.x \
00eee17
-					for better results)
00eee17
-
00eee17
-					CFLAGS+=
00eee17
-else
00eee17
-				#really old version
00eee17
-$(warning			You are using an old and unsupported gcc \
00eee17
-					 version ($(CC_SHORTVER)), compile at your own risk!)
00eee17
-
00eee17
-endif			# CC_CLASS, 2.9x
00eee17
-endif			# CC_CLASS, 3.x
00eee17
-endif			# CC_CLASS, 4.x
00eee17
-
00eee17
-else		# CC_NAME, gcc
00eee17
-				#other compilers
00eee17
-$(error 			Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
00eee17
-endif		#CC_NAME, gcc
00eee17
-endif	#ARCH, arm
00eee17
-
00eee17
-	#if  mips (R3000)
00eee17
-ifeq	($(ARCH), mips)
00eee17
-		# if gcc
00eee17
-ifeq		($(CC_NAME), gcc)
00eee17
-				#common stuff
00eee17
-				CFLAGS+=$(CC_OPTIMIZE_FLAG) -funroll-loops  -Wcast-align $(PROFILE) \
00eee17
-					-Wall
00eee17
-			#if gcc 4.0+
00eee17
-ifeq			($(CC_CLASS), 4.x)
00eee17
-					CFLAGS+=-mcpu=r3000 -minline-all-stringops \
00eee17
-							-ftree-vectorize
00eee17
-else
00eee17
-			#if gcc 3.0+
00eee17
-ifeq			($(CC_CLASS), 3.x)
00eee17
-					CFLAGS+= -mcpu=r3000
00eee17
-							#-mcpu=athlon
00eee17
-else
00eee17
-ifeq			($(CC_CLASS), 2.9x) #older gcc version (2.9[1-5])
00eee17
-$(warning 			Old gcc detected ($(CC_SHORTVER)), use  gcc 3.0.x \
00eee17
-					for better results)
00eee17
-
00eee17
-					CFLAGS+=-mcpu=r3000
00eee17
-else
00eee17
-				#really old version
00eee17
-$(warning			You are using an old and unsupported gcc \
00eee17
-					 version ($(CC_SHORTVER)), compile at your own risk!)
00eee17
-
00eee17
-endif			# CC_CLASS, 2.9x
00eee17
-endif			# CC_CLASS, 3.x
00eee17
-endif			# CC_CLASS, 4.x
00eee17
-
00eee17
-else		# CC_NAME, gcc
00eee17
-				#other compilers
00eee17
-$(error 			Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
00eee17
-endif		#CC_NAME, gcc
00eee17
-endif	#ARCH, mips
00eee17
-
00eee17
-	#if  >=mips2 (R4000, R5000, R6000 ....)
00eee17
-ifeq	($(ARCH), mips2)
00eee17
-		# if gcc
00eee17
-ifeq		($(CC_NAME), gcc)
00eee17
-				#common stuff
00eee17
-				CFLAGS+=$(CC_OPTIMIZE_FLAG) -mips2 -funroll-loops $(PROFILE) \
00eee17
-					-Wall
00eee17
-			#if gcc 4.0+
00eee17
-ifeq			($(CC_CLASS), 4.x)
00eee17
-					CFLAGS+=-minline-all-stringops -ftree-vectorize
00eee17
-else
00eee17
-			#if gcc 3.0+
00eee17
-ifeq			($(CC_CLASS), 3.x)
00eee17
-					CFLAGS+=
00eee17
-else
00eee17
-ifeq			($(CC_CLASS), 2.9x) #older gcc version (2.9[1-5])
00eee17
-$(warning 			Old gcc detected ($(CC_SHORTVER)), use  gcc 3.0.x \
00eee17
-					for better results)
00eee17
-					CFLAGS+=
00eee17
-else
00eee17
-				#really old version
00eee17
-$(warning			You are using an old and unsupported gcc \
00eee17
-					 version ($(CC_SHORTVER)), compile at your own risk!)
00eee17
-
00eee17
-endif			# CC_CLASS, 2.9x
00eee17
-endif			# CC_CLASS, 3.x
00eee17
-endif			# CC_CLASS, 4.x
00eee17
-
00eee17
-else		# CC_NAME, gcc
00eee17
-				#other compilers
00eee17
-$(error 			Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
00eee17
-endif		#CC_NAME, gcc
00eee17
-endif	#ARCH, mips2
00eee17
-
00eee17
-#if  alpha
00eee17
-ifeq	($(ARCH), alpha)
00eee17
-		# if gcc
00eee17
-ifeq		($(CC_NAME), gcc)
00eee17
-				#common stuff
00eee17
-				CFLAGS+=$(CC_OPTIMIZE_FLAG) -funroll-loops $(PROFILE)  -Wall
00eee17
-			#if gcc 4.0+
00eee17
-ifeq			($(CC_CLASS), 4.x)
00eee17
-					CFLAGS+=-minline-all-stringops
00eee17
-else
00eee17
-			#if gcc 3.0+
00eee17
-ifeq			($(CC_CLASS), 3.x)
00eee17
-					CFLAGS+=
00eee17
-else
00eee17
-ifeq			($(CC_CLASS), 2.9x) #older gcc version (2.9[1-5])
00eee17
-$(warning 			Old gcc detected ($(CC_SHORTVER)), use  gcc 3.0.x \
00eee17
-					for better results)
00eee17
-					CFLAGS+=
00eee17
-else
00eee17
-				#really old version
00eee17
-$(warning			You are using an old and unsupported gcc \
00eee17
-					 version ($(CC_SHORTVER)), compile at your own risk!)
00eee17
-
00eee17
-endif			# CC_CLASS, 2.9x
00eee17
-endif			# CC_CLASS, 3.x
00eee17
-endif			# CC_CLASS, 4.x
00eee17
-
00eee17
-else		# CC_NAME, gcc
00eee17
-				#other compilers
00eee17
-$(error 			Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
00eee17
-endif		#CC_NAME, gcc
00eee17
-endif	#ARCH, alpha
00eee17
-
00eee17
-#if  ppc
00eee17
-ifeq	($(ARCH), ppc)
00eee17
-		# if gcc
00eee17
-ifeq		($(CC_NAME), gcc)
00eee17
-				#common stuff
00eee17
-				CFLAGS+=$(CC_OPTIMIZE_FLAG) -funroll-loops $(PROFILE)  -Wall
00eee17
-			#if gcc 4.0+
00eee17
-ifeq			($(CC_CLASS), 4.x)
00eee17
-					CPU_TYPE ?= powerpc
00eee17
-					CFLAGS+=-ftree-vectorize \
00eee17
-							-mtune=$(CPU_TYPE) -maltivec
00eee17
-else
00eee17
-			#if gcc 3.0+
00eee17
-ifeq			($(CC_CLASS), 3.x)
00eee17
-					CFLAGS+=
00eee17
-else
00eee17
-ifeq			($(CC_CLASS), 2.9x) #older gcc version (2.9[1-5])
00eee17
-$(warning 			Old gcc detected ($(CC_SHORTVER)), use  gcc 3.0.x \
00eee17
-					for better results)
00eee17
-					CFLAGS+=
00eee17
-else
00eee17
-				#really old version
00eee17
-$(warning			You are using an old and unsupported gcc \
00eee17
-					 version ($(CC_SHORTVER)), compile at your own risk!)
00eee17
-
00eee17
-endif			# CC_CLASS, 2.9x
00eee17
-endif			# CC_CLASS, 3.x
00eee17
-endif			# CC_CLASS, 4.x
00eee17
-
00eee17
-else		# CC_NAME, gcc
00eee17
-				#other compilers
00eee17
-$(error 			Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
00eee17
-endif		#CC_NAME, gcc
00eee17
-endif	#ARCH, ppc
00eee17
-
00eee17
-#if  ppc64
00eee17
-ifeq	($(ARCH), ppc64)
00eee17
-		# if gcc
00eee17
-ifeq		($(CC_NAME), gcc)
00eee17
-				#common stuff
00eee17
-				CFLAGS+=$(CC_OPTIMIZE_FLAG) -funroll-loops $(PROFILE)  -Wall
00eee17
-ifeq			($(CC_CLASS), 4.x)
00eee17
-					CPU_TYPE ?= powerpc64
00eee17
-					CFLAGS+=-ftree-vectorize \
00eee17
-							-mtune=$(CPU_TYPE) -maltivec
00eee17
-else
00eee17
-			#if gcc 3.0+
00eee17
-ifeq			($(CC_CLASS), 3.x)
00eee17
-					CFLAGS+=
00eee17
-else
00eee17
-ifeq			($(CC_CLASS), 2.9x) #older gcc version (2.9[1-5])
00eee17
-$(warning 			Old gcc detected ($(CC_SHORTVER)), use  gcc 3.0.x \
00eee17
-					for better results)
00eee17
-					CFLAGS+=
00eee17
-else
00eee17
-				#really old version
00eee17
-$(warning			You are using an old and unsupported gcc \
00eee17
-					 version ($(CC_SHORTVER)), compile at your own risk!)
00eee17
-
00eee17
-endif			# CC_CLASS, 2.9x
00eee17
-endif			# CC_CLASS, 3.x
00eee17
-endif			# CC_CLASS, 4.x
00eee17
-
00eee17
-else		# CC_NAME, gcc
00eee17
-				#other compilers
00eee17
-$(error 			Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
00eee17
-endif		#CC_NAME, gcc
00eee17
-endif	#ARCH, ppc
00eee17
-
00eee17
-endif   # CFLAGS not set
00eee17
-
00eee17
-CFLAGS+= $(CC_EXTRA_OPTS)
00eee17
-
00eee17
 LD_EXTRA_OPTS ?=
00eee17
 
00eee17
 # setting LDFLAGS