|
|
|
@ -27,7 +27,7 @@ endif # verbose
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
ifeq (,$(main_makefile))
|
|
|
|
|
# hack to automatically use config.mak in all the modules, without
|
|
|
|
|
# hack to automatically use config.mak in all the modules, without
|
|
|
|
|
# changing the current module makefiles (which all include Makefile.defs):
|
|
|
|
|
# if not called from the main makefile (module, lib or ut):
|
|
|
|
|
# include config.mak, but if not present or incomplete (makefile_defs!=1)
|
|
|
|
@ -96,7 +96,7 @@ INSTALL_FLAVOUR=$(FLAVOUR)
|
|
|
|
|
# version number
|
|
|
|
|
VERSION = 4
|
|
|
|
|
PATCHLEVEL = 4
|
|
|
|
|
SUBLEVEL = 1
|
|
|
|
|
SUBLEVEL = 2
|
|
|
|
|
|
|
|
|
|
# memory manager switcher
|
|
|
|
|
# 0 - f_malloc (fast malloc)
|
|
|
|
@ -149,7 +149,7 @@ OSREL_N:= $(shell echo $(OSREL) | sed -e 's/^[^0-9]*//' \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TLS support
|
|
|
|
|
CORE_TLS ?=
|
|
|
|
|
CORE_TLS ?=
|
|
|
|
|
# by default compile with tls hooks support (so that no ser recompile is
|
|
|
|
|
# needed before the tls module can be used)
|
|
|
|
|
TLS_HOOKS=1
|
|
|
|
@ -176,7 +176,7 @@ INSTALL ?= install
|
|
|
|
|
TAR ?= tar
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
INSTALL_TOUCH = touch # used to create the file first (good to
|
|
|
|
|
INSTALL_TOUCH = touch # used to create the file first (good to
|
|
|
|
|
# make solaris install work)
|
|
|
|
|
INSTALL_CFG = $(INSTALL) -m 644
|
|
|
|
|
INSTALL_BIN = $(INSTALL) -m 755
|
|
|
|
@ -220,8 +220,8 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
|
|
|
|
|
# CC_VER:=$(word 1,$(CC)) $(shell $(CC) - --version|head -n 1|cut -d" " -f 3\
|
|
|
|
|
# |sed -e 's/^.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/'\
|
|
|
|
|
# -e 's/^[^0-9].*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/')
|
|
|
|
|
# sed with POSIX.1 regex doesn't support |, + or ?
|
|
|
|
|
# (darwin, solaris ...) => this complicated expression
|
|
|
|
|
# sed with POSIX.1 regex doesn't support |, + or ?
|
|
|
|
|
# (darwin, solaris ...) => this complicated expression
|
|
|
|
|
MKDEP=$(CC) -MM -MG
|
|
|
|
|
#transform gcc version into 2.9x or 3.0
|
|
|
|
|
CC_SHORTVER:=$(shell echo "$(CC_VER)" | cut -d" " -f 2| \
|
|
|
|
@ -238,8 +238,10 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
|
|
|
|
|
-e 's/4\.[5-9]\..*/4.5+/' \
|
|
|
|
|
-e 's/4\.[5-9]$$/4.5+/' \
|
|
|
|
|
-e 's/5\.[0-9]\..*/5.0+/' \
|
|
|
|
|
-e 's/5\.[0-9]$$/5.0+/')
|
|
|
|
|
ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
-e 's/5\.[0-9]$$/5.0+/' \
|
|
|
|
|
-e 's/6\.[0-9]\..*/6.0+/' \
|
|
|
|
|
-e 's/6\.[0-9]$$/6.0+/')
|
|
|
|
|
ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
# dependencies can be generated on-the-fly while compiling *.c
|
|
|
|
|
CC_MKDEP_OPTS=-MMD -MP
|
|
|
|
|
endif # 3.0 <= $(CC_SHORTVER) <= 4.x
|
|
|
|
@ -250,7 +252,7 @@ ifneq (, $(findstring Sun, $(CC_LONGVER)))
|
|
|
|
|
CC_SHORTVER:=$(shell echo "$(CC_LONGVER)"|head -n 1| \
|
|
|
|
|
sed -e 's/.*\([0-9]\.[0-9]\).*/\1/g' )
|
|
|
|
|
CC_VER=$(CC) $(CC_SHORTVER)
|
|
|
|
|
MKDEP=$(CC) -xM1
|
|
|
|
|
MKDEP=$(CC) -xM1
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifneq (, $(findstring Intel(R) C++ Compiler, $(CC_LONGVER)))
|
|
|
|
@ -260,7 +262,7 @@ ifneq (, $(findstring Intel(R) C++ Compiler, $(CC_LONGVER)))
|
|
|
|
|
sed -e 's/.*Version \([0-9]\.[0-9]\.[0-9]*\).*/\1/g' )
|
|
|
|
|
CC_SHORTVER:=$(shell echo "$(CC_FULLVER)" | cut -d. -f1,2 )
|
|
|
|
|
CC_VER=$(CC) $(CC_FULLVER)
|
|
|
|
|
MKDEP=$(CC) -MM
|
|
|
|
|
MKDEP=$(CC) -MM
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifneq (, $(findstring clang, $(CC_LONGVER)))
|
|
|
|
@ -270,7 +272,7 @@ ifneq (, $(findstring clang, $(CC_LONGVER)))
|
|
|
|
|
CC_SHORTVER:=$(shell echo "$(CC_FULLVER)" | cut -d. -f1,2 )
|
|
|
|
|
CC_VER=$(CC) $(CC_FULLVER)
|
|
|
|
|
CC_OPT=-O3
|
|
|
|
|
MKDEP=$(CC) -MM
|
|
|
|
|
MKDEP=$(CC) -MM
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifeq (,$(CC_NAME))
|
|
|
|
@ -278,7 +280,7 @@ ifeq (,$(CC_NAME))
|
|
|
|
|
CC_NAME=$(CC)
|
|
|
|
|
CC_SHORTVER=unknown
|
|
|
|
|
CC_VER=unknown
|
|
|
|
|
MKDEP=gcc -MM
|
|
|
|
|
MKDEP=gcc -MM
|
|
|
|
|
$(warning Unknown compiler $(CC)\; supported compilers: \
|
|
|
|
|
gcc, sun cc, intel icc )
|
|
|
|
|
endif
|
|
|
|
@ -517,8 +519,8 @@ data_target = $(prefix)/$(data_dir)
|
|
|
|
|
# an implemetation of the "two levels segregated fit" malloc algorithm
|
|
|
|
|
# -DDL_MALLOC
|
|
|
|
|
# a malloc implementation based on Doug Lea's dl_malloc
|
|
|
|
|
# -DSF_MALLOC
|
|
|
|
|
# an experimental multi-CPU, pool based, multi-process safe version of
|
|
|
|
|
# -DSF_MALLOC
|
|
|
|
|
# an experimental multi-CPU, pool based, multi-process safe version of
|
|
|
|
|
# F_MALLOC. Should give better performance on machines with lots of CPUs
|
|
|
|
|
# after some tunning.
|
|
|
|
|
# -DLL_MALLOC
|
|
|
|
@ -534,7 +536,7 @@ data_target = $(prefix)/$(data_dir)
|
|
|
|
|
# -DUSE_SYSV_SEM
|
|
|
|
|
# uses sys v sems for locking (slower & limited number)
|
|
|
|
|
# -DUSE_PTHREAD_MUTEX
|
|
|
|
|
# uses pthread mutexes, faster than sys v or posix sems, but do not
|
|
|
|
|
# uses pthread mutexes, faster than sys v or posix sems, but do not
|
|
|
|
|
# work on all systems inter-processes (e.g. linux)
|
|
|
|
|
# -DUSE_POSIX_SEM
|
|
|
|
|
# uses posix semaphores for locking (faster than sys v)
|
|
|
|
@ -546,7 +548,7 @@ data_target = $(prefix)/$(data_dir)
|
|
|
|
|
# try busy waiting for a while and if the lock is still held go to
|
|
|
|
|
# force reschedule (FAST_LOCK)
|
|
|
|
|
# -DADAPTIVE_WAIT_LOOPS=number
|
|
|
|
|
# number of loops we busy wait, after "number" loops have elapsed we
|
|
|
|
|
# number of loops we busy wait, after "number" loops have elapsed we
|
|
|
|
|
# force a reschedule (FAST_LOCK)
|
|
|
|
|
# -DNOSMP
|
|
|
|
|
# don't use smp compliant locking (faster but won't work on SMP machines)
|
|
|
|
@ -560,26 +562,26 @@ data_target = $(prefix)/$(data_dir)
|
|
|
|
|
# -DDISABLE_NAGLE
|
|
|
|
|
# disable the tcp Nagle algorithm (lower delay)
|
|
|
|
|
# -DUSE_TLS
|
|
|
|
|
# compiles in tls support, requires -DUSE_TCP. Note: this is only
|
|
|
|
|
# compiles in tls support, requires -DUSE_TCP. Note: this is only
|
|
|
|
|
# generic support (parsing a.s.o.), it does not include the actual
|
|
|
|
|
# "tls engine". If you really want tls you need also either
|
|
|
|
|
# -DCORE_TLS and a tls/ subdir with the tls code or -DTLS_HOOKS and
|
|
|
|
|
# the tls module loaded.
|
|
|
|
|
# -DCORE_TLS
|
|
|
|
|
# compiles tls in-core support. Requires -DUSE_TLS, conflicts
|
|
|
|
|
# compiles tls in-core support. Requires -DUSE_TLS, conflicts
|
|
|
|
|
# -DTLS_HOOKS. Please use make CORE_TLS=1 instead (it will set all the
|
|
|
|
|
# needed defines automatically and extra libraries needed for linking).
|
|
|
|
|
# -DTLS_HOOKS
|
|
|
|
|
# compile tls module support (support for having the "tls engine" in a
|
|
|
|
|
# module). Requires -DUSE_TLS, conflicts -DCORE_TLS.
|
|
|
|
|
# Please use make TLS_HOOKS=1 (or TLS_HOOKS=0 to for disabling) instead
|
|
|
|
|
# of setting -DTLS_HOOKS (it will set all the needed defines
|
|
|
|
|
# of setting -DTLS_HOOKS (it will set all the needed defines
|
|
|
|
|
# automatically)
|
|
|
|
|
# -DHAVE_RESOLV_RES
|
|
|
|
|
# support for changing some of the resolver parameters present
|
|
|
|
|
# (_res structure in <resolv.h>)
|
|
|
|
|
# -DUSE_COMP
|
|
|
|
|
# compiles in comp=[sergz|sigcomp] support (parsing uri & via,
|
|
|
|
|
# compiles in comp=[sergz|sigcomp] support (parsing uri & via,
|
|
|
|
|
# adding it to via, lumps a.s.o). WARNING: right now this option
|
|
|
|
|
# is useless since the compression code doesn't exist yet.
|
|
|
|
|
# -DHONOR_MADDR
|
|
|
|
@ -602,7 +604,7 @@ data_target = $(prefix)/$(data_dir)
|
|
|
|
|
# if enabled profiling will be enabled for child processes
|
|
|
|
|
# Don't forget to set PROFILE (see below)
|
|
|
|
|
# -DNO_SIG_DEBUG
|
|
|
|
|
# turns off debugging messages in signal handlers (which might be
|
|
|
|
|
# turns off debugging messages in signal handlers (which might be
|
|
|
|
|
# unsafe)
|
|
|
|
|
# -DUSE_NAPTR
|
|
|
|
|
# turns on naptr support (but must be also enabled from the config)
|
|
|
|
@ -666,7 +668,7 @@ C_DEFS= $(extra_defs) \
|
|
|
|
|
# you may also want to set -DPROFILING
|
|
|
|
|
|
|
|
|
|
# WARNING: do not add mode=debug or mode=release anymore in the Makefile,
|
|
|
|
|
# use make mode=debug all instead. Anyway no by default ser is compiled w/
|
|
|
|
|
# use make mode=debug all instead. Anyway no by default ser is compiled w/
|
|
|
|
|
# debugging symbols in all cases (-g). --andrei
|
|
|
|
|
|
|
|
|
|
# memory managers and related debug mode
|
|
|
|
@ -736,7 +738,7 @@ ifeq ($(CC_NAME), gcc)
|
|
|
|
|
else echo "as" ; \
|
|
|
|
|
fi\
|
|
|
|
|
fi)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDTYPE:=$(shell if $(LDPATH) -V 1>/dev/null 2>/dev/null; then \
|
|
|
|
|
if $(LDPATH) -V 2>&1|grep GNU >/dev/null; \
|
|
|
|
|
then echo gnu; \
|
|
|
|
@ -825,7 +827,7 @@ ifeq ($(ARCH), alpha)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifeq ($(use_fast_lock), yes)
|
|
|
|
|
C_DEFS+= -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
|
|
|
|
|
C_DEFS+= -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
|
|
|
|
|
found_lock_method=yes
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
@ -836,13 +838,13 @@ C_INCLUDES=
|
|
|
|
|
ifeq ($(mode), release)
|
|
|
|
|
#if i386
|
|
|
|
|
ifeq ($(ARCH), i386)
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS=-g $(CC_OPT) -funroll-loops -Wcast-align $(PROFILE)
|
|
|
|
|
#if gcc 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
#if gcc 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
$(call set_if_empty,CPUTYPE,athlon64)
|
|
|
|
|
CFLAGS+=-m32 -minline-all-stringops \
|
|
|
|
|
-falign-loops \
|
|
|
|
@ -857,7 +859,7 @@ $(call set_if_empty,CPUTYPE,athlon64)
|
|
|
|
|
CFLAGS+=-m32 -minline-all-stringops \
|
|
|
|
|
-falign-loops \
|
|
|
|
|
-ftree-vectorize \
|
|
|
|
|
-mtune=$(CPUTYPE)
|
|
|
|
|
-mtune=$(CPUTYPE)
|
|
|
|
|
LDFLAGS+=-m32
|
|
|
|
|
else
|
|
|
|
|
#if gcc 3.4+
|
|
|
|
@ -865,7 +867,7 @@ ifeq ($(CC_SHORTVER), 3.4)
|
|
|
|
|
$(call set_if_empty,CPUTYPE,athlon)
|
|
|
|
|
CFLAGS+=-m32 -minline-all-stringops \
|
|
|
|
|
-falign-loops \
|
|
|
|
|
-mtune=$(CPUTYPE)
|
|
|
|
|
-mtune=$(CPUTYPE)
|
|
|
|
|
LDFLAGS+=-m32
|
|
|
|
|
else
|
|
|
|
|
#if gcc 3.0+
|
|
|
|
@ -879,7 +881,7 @@ else
|
|
|
|
|
ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5])
|
|
|
|
|
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc >= 3.1 \
|
|
|
|
|
for better results)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CFLAGS+=-m486 \
|
|
|
|
|
-malign-loops=4
|
|
|
|
|
else
|
|
|
|
@ -891,7 +893,7 @@ endif # CC_SHORTVER, 2.9x
|
|
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
|
|
endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
|
|
ifeq ($(CC_NAME), clang)
|
|
|
|
@ -903,7 +905,7 @@ else # CC_NAME, clang
|
|
|
|
|
ifeq ($(CC_NAME), icc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
CFLAGS=-g -O3 -ipo -ipo_obj -unroll $(PROFILE) \
|
|
|
|
|
-tpp6 -xK #-openmp #optimize for PIII
|
|
|
|
|
-tpp6 -xK #-openmp #optimize for PIII
|
|
|
|
|
# -prefetch doesn't seem to work
|
|
|
|
|
#( ty to inline acroos files, unroll loops,prefetch,
|
|
|
|
|
# optimize for PIII, use PIII instructions & vect.,
|
|
|
|
@ -918,14 +920,14 @@ endif #ARCH, i386
|
|
|
|
|
|
|
|
|
|
#x86_64
|
|
|
|
|
ifeq ($(ARCH), x86_64)
|
|
|
|
|
# if gcc
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS=-g $(CC_OPT) -funroll-loops -Wcast-align $(PROFILE)
|
|
|
|
|
#if gcc 4.5+
|
|
|
|
|
# don't add '-mtune=$(CPUTYPE)' - gcc failure
|
|
|
|
|
ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.5+ 5.0+))
|
|
|
|
|
ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.5+ 5.0+ 6.0+))
|
|
|
|
|
$(call set_if_empty,CPUTYPE,opteron)
|
|
|
|
|
CFLAGS+=-m64 -minline-all-stringops \
|
|
|
|
|
-falign-loops \
|
|
|
|
@ -949,21 +951,21 @@ $(call set_if_empty,CPUTYPE,opteron)
|
|
|
|
|
CFLAGS+=-m64 -minline-all-stringops \
|
|
|
|
|
-falign-loops \
|
|
|
|
|
-ftree-vectorize \
|
|
|
|
|
-mtune=$(CPUTYPE)
|
|
|
|
|
-mtune=$(CPUTYPE)
|
|
|
|
|
LDFLAGS+=-m64
|
|
|
|
|
else
|
|
|
|
|
#if gcc 3.4
|
|
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
|
|
$(call set_if_empty,CPUTYPE,athlon64)
|
|
|
|
|
CFLAGS+=-m64 -minline-all-stringops \
|
|
|
|
|
-falign-loops
|
|
|
|
|
-falign-loops
|
|
|
|
|
LDFLAGS+=-m64
|
|
|
|
|
else
|
|
|
|
|
#if gcc 3.0
|
|
|
|
|
ifeq ($(CC_SHORTVER), 3.0)
|
|
|
|
|
$(call set_if_empty,CPUTYPE,athlon64)
|
|
|
|
|
CFLAGS+=-minline-all-stringops \
|
|
|
|
|
-falign-loops
|
|
|
|
|
-falign-loops
|
|
|
|
|
#-mcpu=$(CPUTYPE) \ # not working on all x86_64 gccs
|
|
|
|
|
#-mcpu=athlon
|
|
|
|
|
#-m64 on x86_64/x86 works starting with gcc 3.2
|
|
|
|
@ -971,7 +973,7 @@ else
|
|
|
|
|
ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5])
|
|
|
|
|
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc >= 3.1 \
|
|
|
|
|
for better results)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CFLAGS+=-m486 \
|
|
|
|
|
-malign-loops=4
|
|
|
|
|
else
|
|
|
|
@ -984,20 +986,20 @@ endif # CC_SHORTVER, 3.0
|
|
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
|
|
endif # CC_SHORTVER, 4.2+
|
|
|
|
|
endif # CC_SHORTVER, 5.0+, 4.5+
|
|
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+
|
|
|
|
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
|
|
ifeq ($(CC_NAME), clang)
|
|
|
|
|
$(call set_if_empty,CPUTYPE,opteron)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
CFLAGS+=-g -m64 \
|
|
|
|
|
$(CC_OPT)
|
|
|
|
|
$(CC_OPT)
|
|
|
|
|
LDFLAGS+=-m64
|
|
|
|
|
else # CC_NAME, clang
|
|
|
|
|
ifeq ($(CC_NAME), icc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
CFLAGS=-g -O3 -ipo -ipo_obj -unroll $(PROFILE) \
|
|
|
|
|
-tpp6 -xK #-openmp #optimize for PIII
|
|
|
|
|
-tpp6 -xK #-openmp #optimize for PIII
|
|
|
|
|
# -prefetch doesn't seem to work
|
|
|
|
|
#( ty to inline acroos files, unroll loops,prefetch,
|
|
|
|
|
# optimize for PIII, use PIII instructions & vect.,
|
|
|
|
@ -1018,9 +1020,9 @@ ifeq ($(CC_NAME), gcc)
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS=-g $(CC_OPT) -funroll-loops $(PROFILE) \
|
|
|
|
|
#-Wcast-align \
|
|
|
|
|
#-Wmissing-prototypes
|
|
|
|
|
#if gcc 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
#-Wmissing-prototypes
|
|
|
|
|
#if gcc 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
$(call set_if_empty,CPUTYPE,ultrasparc)
|
|
|
|
|
#use 32bit for now
|
|
|
|
|
CFLAGS+=-m64 -mcpu=ultrasparc \
|
|
|
|
@ -1066,28 +1068,28 @@ $(warning Old gcc detected ($(CC_SHORTVER)), use gcc >= 3.1 \
|
|
|
|
|
ifneq ($(OS), netbsd)
|
|
|
|
|
# on netbsd/sparc64, gcc 2.95.3 does not compile
|
|
|
|
|
# ser with -mv8
|
|
|
|
|
CFLAGS+= -mv9
|
|
|
|
|
CFLAGS+= -mv9
|
|
|
|
|
# -m64/-m32 on sparc works starting with gcc 3.0
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(ASTYPE), solaris)
|
|
|
|
|
CFLAGS+= -Wa,-xarch=v8plus
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
else #CC_SHORTVER, 2.9x
|
|
|
|
|
#really old version
|
|
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
|
|
|
|
|
|
|
CFLAGS+= -mv9
|
|
|
|
|
|
|
|
|
|
CFLAGS+= -mv9
|
|
|
|
|
ifeq ($(ASTYPE), solaris)
|
|
|
|
|
CFLAGS+= -Wa,-xarch=v8plus
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
endif #CC_SHORTVER, 2.9x
|
|
|
|
|
endif #CC_SHORTVER, 3.0
|
|
|
|
|
endif #CC_SHORTVER, 3.4
|
|
|
|
|
endif #CC_SHORTVER, 4.x
|
|
|
|
|
endif #CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
endif #CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else #CC_NAME, gcc
|
|
|
|
|
ifeq ($(CC_NAME), suncc)
|
|
|
|
|
C_DEFS+=-DSPARC64_MODE
|
|
|
|
@ -1109,9 +1111,9 @@ ifeq ($(CC_NAME), gcc)
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS=-g $(CC_OPT) -funroll-loops $(PROFILE) \
|
|
|
|
|
#-Wcast-align \
|
|
|
|
|
#-Wmissing-prototypes
|
|
|
|
|
#-Wmissing-prototypes
|
|
|
|
|
#if gcc 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
$(call set_if_empty,CPUTYPE,v8)
|
|
|
|
|
#use 32bit for now
|
|
|
|
|
CFLAGS+= -mtune=$(CPUTYPE) \
|
|
|
|
@ -1147,13 +1149,13 @@ else #CC_SHORTVER, 2.9x
|
|
|
|
|
#really old version
|
|
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif #CC_SHORTVER, 2.9x
|
|
|
|
|
endif #CC_SHORTVER, 3.0
|
|
|
|
|
endif #CC_SHORTVER, 3.4
|
|
|
|
|
endif #CC_SHORTVER, 4.x
|
|
|
|
|
endif #CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
endif #CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else #CC_NAME, gcc
|
|
|
|
|
ifeq ($(CC_NAME), suncc)
|
|
|
|
|
CFLAGS+= -g -xO5 -fast -native -xCC \
|
|
|
|
@ -1168,20 +1170,20 @@ endif #ARCH, sparc
|
|
|
|
|
|
|
|
|
|
#if ipaq/netwinder
|
|
|
|
|
ifeq ($(ARCH), arm)
|
|
|
|
|
# if gcc
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS=-marm -march=armv5t $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
|
|
|
|
|
#if gcc 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
CFLAGS+= -ftree-vectorize -fno-strict-overflow
|
|
|
|
|
# not supported on arm: -minline-all-stringops
|
|
|
|
|
# not supported on arm: -minline-all-stringops
|
|
|
|
|
else
|
|
|
|
|
#if gcc 4.x+
|
|
|
|
|
ifeq ($(CC_SHORTVER), 4.x)
|
|
|
|
|
CFLAGS+= -ftree-vectorize
|
|
|
|
|
# not supported on arm: -minline-all-stringops
|
|
|
|
|
# not supported on arm: -minline-all-stringops
|
|
|
|
|
else
|
|
|
|
|
#if gcc 3.4+
|
|
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
|
@ -1189,41 +1191,41 @@ ifeq ($(CC_SHORTVER), 3.4)
|
|
|
|
|
else
|
|
|
|
|
#if gcc 3.0
|
|
|
|
|
ifeq ($(CC_SHORTVER), 3.0)
|
|
|
|
|
CFLAGS+=
|
|
|
|
|
CFLAGS+=
|
|
|
|
|
#-mcpu=athlon
|
|
|
|
|
else
|
|
|
|
|
ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5])
|
|
|
|
|
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \
|
|
|
|
|
for better results)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CFLAGS+=
|
|
|
|
|
else
|
|
|
|
|
#really old version
|
|
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
|
|
endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
|
|
#other compilers
|
|
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
|
|
endif #CC_NAME, gcc
|
|
|
|
|
endif #ARCH, arm
|
|
|
|
|
endif #ARCH, arm
|
|
|
|
|
|
|
|
|
|
#if armv6 cpu
|
|
|
|
|
#if armv6 cpu
|
|
|
|
|
ifeq ($(ARCH), arm6)
|
|
|
|
|
# if gcc
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS=-march=armv6 $(CC_OPT) -funroll-loops -fsigned-char \
|
|
|
|
|
$(PROFILE)
|
|
|
|
|
#if gcc 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
#if gcc 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
CFLAGS+= -ftree-vectorize -fno-strict-overflow
|
|
|
|
|
else
|
|
|
|
|
#if gcc 4.x+
|
|
|
|
@ -1236,25 +1238,25 @@ ifeq ($(CC_SHORTVER), 3.4)
|
|
|
|
|
else
|
|
|
|
|
#if gcc 3.0
|
|
|
|
|
ifeq ($(CC_SHORTVER), 3.0)
|
|
|
|
|
CFLAGS+=
|
|
|
|
|
CFLAGS+=
|
|
|
|
|
#-mcpu=athlon
|
|
|
|
|
else
|
|
|
|
|
ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5])
|
|
|
|
|
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \
|
|
|
|
|
for better results)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CFLAGS+=
|
|
|
|
|
else
|
|
|
|
|
#really old version
|
|
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
|
|
endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
|
|
#other compilers
|
|
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
|
@ -1263,13 +1265,13 @@ endif #ARCH, arm6
|
|
|
|
|
|
|
|
|
|
#if mips (R3000)
|
|
|
|
|
ifeq ($(ARCH), mips)
|
|
|
|
|
# if gcc
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS=$(CC_OPT) -funroll-loops $(PROFILE)
|
|
|
|
|
#if gcc 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
#if gcc 6.0, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
CFLAGS+=-mfp32 -march=r3000 \
|
|
|
|
|
-ftree-vectorize -fno-strict-overflow
|
|
|
|
|
# not supported on mips: -minline-all-stringops
|
|
|
|
@ -1291,19 +1293,19 @@ else
|
|
|
|
|
ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5])
|
|
|
|
|
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \
|
|
|
|
|
for better results)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CFLAGS+=-march=r3000
|
|
|
|
|
else
|
|
|
|
|
#really old version
|
|
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
|
|
endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
|
|
#other compilers
|
|
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
|
@ -1312,13 +1314,13 @@ endif #ARCH, mips
|
|
|
|
|
|
|
|
|
|
#if >=mips2 (R4000, R5000, R6000 ....)
|
|
|
|
|
ifeq ($(ARCH), mips2)
|
|
|
|
|
# if gcc
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS= -mips2 $(CC_OPT) -funroll-loops $(PROFILE)
|
|
|
|
|
#if gcc 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
#if gcc 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
CFLAGS+=-ftree-vectorize -fno-strict-overflow
|
|
|
|
|
# not supported on mips: -minline-all-stringops
|
|
|
|
|
else
|
|
|
|
@ -1343,13 +1345,13 @@ else
|
|
|
|
|
#really old version
|
|
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
|
|
endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
|
|
#other compilers
|
|
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
|
@ -1358,13 +1360,13 @@ endif #ARCH, mips2
|
|
|
|
|
|
|
|
|
|
#if >=mips64
|
|
|
|
|
ifeq ($(ARCH), mips64)
|
|
|
|
|
# if gcc
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS= -mips64 $(CC_OPT) -funroll-loops $(PROFILE)
|
|
|
|
|
#if gcc 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
#if gcc 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
CFLAGS+=-ftree-vectorize -fno-strict-overflow
|
|
|
|
|
# not supported on mips: -minline-all-stringops
|
|
|
|
|
|
|
|
|
@ -1390,13 +1392,13 @@ else
|
|
|
|
|
#really old version
|
|
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
|
|
endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
|
|
#other compilers
|
|
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
|
@ -1405,19 +1407,19 @@ endif #ARCH, mips64
|
|
|
|
|
|
|
|
|
|
#if alpha
|
|
|
|
|
ifeq ($(ARCH), alpha)
|
|
|
|
|
# if gcc
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
|
|
|
|
|
#if gcc 5.0+, 4.5 or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
CFLAGS+= -fno-strict-overflow
|
|
|
|
|
# not supported: -minline-all-stringops
|
|
|
|
|
else
|
|
|
|
|
#if gcc 4.0+
|
|
|
|
|
ifeq ($(CC_SHORTVER), 4.x)
|
|
|
|
|
CFLAGS+=
|
|
|
|
|
CFLAGS+=
|
|
|
|
|
# not supported: -minline-all-stringops
|
|
|
|
|
else
|
|
|
|
|
#if gcc 3.4+
|
|
|
|
@ -1436,28 +1438,28 @@ else
|
|
|
|
|
#really old version
|
|
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
|
|
endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
|
|
#other compilers
|
|
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
|
|
endif #CC_NAME, gcc
|
|
|
|
|
endif #ARCH, alpha
|
|
|
|
|
endif #ARCH, alpha
|
|
|
|
|
|
|
|
|
|
#if ppc
|
|
|
|
|
ifeq ($(ARCH), ppc)
|
|
|
|
|
# if gcc
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS=
|
|
|
|
|
#if gcc 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
#if gcc 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
$(call set_if_empty,CPUTYPE,powerpc)
|
|
|
|
|
ifeq ($(NOALTIVEC),)
|
|
|
|
|
CFLAGS += $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
|
|
|
|
@ -1493,28 +1495,28 @@ else
|
|
|
|
|
#really old version
|
|
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
|
|
endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
|
|
#other compilers
|
|
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
|
|
endif #CC_NAME, gcc
|
|
|
|
|
endif #ARCH, ppc
|
|
|
|
|
endif #ARCH, ppc
|
|
|
|
|
|
|
|
|
|
#if ppc64
|
|
|
|
|
ifeq ($(ARCH), ppc64)
|
|
|
|
|
# if gcc
|
|
|
|
|
# if gcc
|
|
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
|
|
#common stuff
|
|
|
|
|
CFLAGS= $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
|
|
|
|
|
#if gcc 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
|
|
|
|
|
#if gcc 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
|
|
$(call set_if_empty,CPUTYPE,powerpc64)
|
|
|
|
|
CFLAGS+=-ftree-vectorize \
|
|
|
|
|
-fno-strict-overflow \
|
|
|
|
@ -1542,18 +1544,18 @@ else
|
|
|
|
|
#really old version
|
|
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
|
|
endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
|
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
|
|
#other compilers
|
|
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
|
|
endif #CC_NAME, gcc
|
|
|
|
|
endif #ARCH, ppc
|
|
|
|
|
endif #ARCH, ppc
|
|
|
|
|
|
|
|
|
|
CFLAGS+= $(CC_EXTRA_OPTS)
|
|
|
|
|
|
|
|
|
@ -1567,9 +1569,9 @@ ifeq ($(LDTYPE), solaris)
|
|
|
|
|
LIB_LDFLAGS:=-G $(LDFLAGS)
|
|
|
|
|
LIB_SONAME=-Wl,-h,
|
|
|
|
|
LD_RPATH=-Wl,-R,
|
|
|
|
|
else
|
|
|
|
|
else
|
|
|
|
|
#gcc and maybe others, => gnu ld
|
|
|
|
|
LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE)
|
|
|
|
|
LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE)
|
|
|
|
|
MOD_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
|
|
LIB_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
|
|
LIB_SONAME=-Wl,-soname,
|
|
|
|
@ -1578,7 +1580,7 @@ endif
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(CC_NAME), icc)
|
|
|
|
|
#gcc and maybe others
|
|
|
|
|
LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE)
|
|
|
|
|
LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE)
|
|
|
|
|
MOD_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
|
|
LIB_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
|
|
LIB_SONAME=-Wl,-soname,
|
|
|
|
@ -1598,10 +1600,10 @@ endif
|
|
|
|
|
|
|
|
|
|
ifeq ($(CC_NAME), clang)
|
|
|
|
|
LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE)
|
|
|
|
|
MOD_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
|
|
LIB_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
|
|
LIB_SONAME=-Wl,-soname,
|
|
|
|
|
LD_RPATH=-Wl,-rpath,
|
|
|
|
|
MOD_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
|
|
LIB_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
|
|
LIB_SONAME=-Wl,-soname,
|
|
|
|
|
LD_RPATH=-Wl,-rpath,
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
LDFLAGS+= $(LD_EXTRA_OPTS)
|
|
|
|
@ -1724,8 +1726,8 @@ ifeq ($(OS), linux)
|
|
|
|
|
LIBS+=-lpthread
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
# check for >= 2.5.44
|
|
|
|
|
|
|
|
|
|
# check for >= 2.5.44
|
|
|
|
|
ifeq ($(shell [ $(OSREL_N) -ge 2005044 ] && echo has_epoll), has_epoll)
|
|
|
|
|
ifeq ($(NO_EPOLL),)
|
|
|
|
|
C_DEFS+=-DHAVE_EPOLL
|
|
|
|
@ -1824,7 +1826,7 @@ ifeq ($(CC_NAME), suncc)
|
|
|
|
|
endif
|
|
|
|
|
OLD_SOLARIS= $(shell echo "$(OSREL)" | \
|
|
|
|
|
sed -e 's/^5\.[0-6][^0-9]*$$/yes/' )
|
|
|
|
|
LIBS+= -L$(LOCALBASE)/lib -lxnet -lsocket -lnsl
|
|
|
|
|
LIBS+= -L$(LOCALBASE)/lib -lxnet -lsocket -lnsl
|
|
|
|
|
ifeq ($(OLD_SOLARIS), yes)
|
|
|
|
|
LIBS+=-lposix4
|
|
|
|
|
else
|
|
|
|
@ -1903,7 +1905,7 @@ ifeq ($(OS), openbsd)
|
|
|
|
|
# unfortunately pthread is needed for sigwait
|
|
|
|
|
LIBS= -lpthread
|
|
|
|
|
endif # if opensd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(OS), netbsd)
|
|
|
|
|
C_DEFS+=-DHAVE_SOCKADDR_SA_LEN -DHAVE_GETHOSTBYNAME2 \
|
|
|
|
|
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_TIMEGM
|
|
|
|
@ -1924,7 +1926,7 @@ ifeq ($(OS), netbsd)
|
|
|
|
|
C_DEFS+=-DHAVE_SELECT
|
|
|
|
|
endif
|
|
|
|
|
YACC=yacc
|
|
|
|
|
LIBS=
|
|
|
|
|
LIBS=
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# OS X support, same as freebsd
|
|
|
|
@ -1951,7 +1953,7 @@ ifeq ($(OS), darwin)
|
|
|
|
|
C_DEFS+=-DHAVE_SELECT
|
|
|
|
|
endif
|
|
|
|
|
LDFLAGS= # darwin doesn't like -O2 or -E
|
|
|
|
|
# the modules uses symbols from ser => either
|
|
|
|
|
# the modules uses symbols from ser => either
|
|
|
|
|
# -flat_namespace -undefined_suppress or -bundle_loader ../../$(MAIN_NAME)
|
|
|
|
|
MOD_LDFLAGS:= -bundle -flat_namespace -undefined suppress
|
|
|
|
|
# for libs using symbols from ser (e.g srdb2, kcore a.s.o) we
|
|
|
|
@ -2015,7 +2017,7 @@ endif # ifeq ($(makefile_defs), 1)
|
|
|
|
|
|
|
|
|
|
# if incomplete or missing config.mak, or already exported vars, don't
|
|
|
|
|
# try to export/re-export
|
|
|
|
|
ifeq ($(makefile_defs),1)
|
|
|
|
|
ifeq ($(makefile_defs),1)
|
|
|
|
|
ifneq ($(exported_vars),1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|