Module: kamailio
Branch: 5.2
Commit: 354cce84135836a780364f1fef441ba850c9f2ff
URL:
https://github.com/kamailio/kamailio/commit/354cce84135836a780364f1fef441ba…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2019-12-17T09:19:09+01:00
Makefile.defs: use dedicated vars for pthread mutex flags
- CC_EXTRA_OPTS and LD_EXTRA_OPTS may be set from environment
(cherry picked from commit be34082aac3e275058f4747c3706499848ccd86d)
---
Modified: src/Makefile.defs
---
Diff:
https://github.com/kamailio/kamailio/commit/354cce84135836a780364f1fef441ba…
Patch:
https://github.com/kamailio/kamailio/commit/354cce84135836a780364f1fef441ba…
---
diff --git a/src/Makefile.defs b/src/Makefile.defs
index 483a11eb27..a3a07a89df 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -210,8 +210,11 @@ endif
endif
ifeq ($(LIBSSL_SET_MUTEX_SHARED), 1)
-CC_EXTRA_OPTS+= -pthread -DKSR_PTHREAD_MUTEX_SHARED
-LD_EXTRA_OPTS+= -pthread -rdynamic -ldl -Wl,-Bsymbolic-functions
+CC_PMUTEX_OPTS = -pthread -DKSR_PTHREAD_MUTEX_SHARED
+LD_PMUTEX_OPTS = -pthread -rdynamic -ldl -Wl,-Bsymbolic-functions
+else
+CC_PMUTEX_OPTS =
+LD_PMUTEX_OPTS =
endif
ifeq ($(OS), solaris)
@@ -1630,7 +1633,7 @@ $(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
endif #CC_NAME, gcc
endif #ARCH, ppc
-CFLAGS+= $(CC_EXTRA_OPTS)
+CFLAGS+= $(CC_EXTRA_OPTS) $(CC_PMUTEX_OPTS)
# setting LDFLAGS
@@ -1679,9 +1682,9 @@ ifeq ($(CC_NAME), clang)
LD_RPATH=-Wl,-rpath,
endif
-LDFLAGS+= $(LD_EXTRA_OPTS)
-MOD_LDFLAGS+= $(LD_EXTRA_OPTS)
-LIB_LDFLAGS+= $(LD_EXTRA_OPTS)
+LDFLAGS+= $(LD_EXTRA_OPTS) $(LD_PMUTEX_OPTS)
+MOD_LDFLAGS+= $(LD_EXTRA_OPTS) $(LD_PMUTEX_OPTS)
+LIB_LDFLAGS+= $(LD_EXTRA_OPTS) $(LD_PMUTEX_OPTS)
else #mode,release
ifeq ($(CC_NAME), gcc)
@@ -2125,7 +2128,8 @@ saved_fixed_vars:= MAIN_NAME CFG_NAME SCR_NAME FLAVOUR
INSTALL_FLAVOUR \
# variable changeable at compile time
# extra: prefix DESTDIR BASEDIR basedirt
saved_chg_vars:=\
- CC_EXTRA_OPTS CPUTYPE CFLAGS_RM CFLAGS MOD_CFLAGS LIB_CFLAGS UTILS_CFLAGS \
+ CC_EXTRA_OPTS CC_PMUTEX_OPTS CPUTYPE CFLAGS_RM CFLAGS MOD_CFLAGS \
+ LIB_CFLAGS UTILS_CFLAGS \
BASEDIR basedir DESTDIR LIBDIR RUNBASEDIR runbasedir \
PREFIX prefix \
cfg_prefix cfg_dir bin_prefix bin_dir modules_prefix modules_dir \