[sr-dev] git:5.1:be488483: Makefile.defs: use dedicated vars for pthread mutex flags

Victor Seva linuxmaniac at torreviejawireless.org
Tue Dec 17 09:19:58 CET 2019


Module: kamailio
Branch: 5.1
Commit: be488483b71ec4d1bc9eb98cc67b4c69fe8b650a
URL: https://github.com/kamailio/kamailio/commit/be488483b71ec4d1bc9eb98cc67b4c69fe8b650a

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2019-12-17T09:19:41+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/be488483b71ec4d1bc9eb98cc67b4c69fe8b650a.diff
Patch: https://github.com/kamailio/kamailio/commit/be488483b71ec4d1bc9eb98cc67b4c69fe8b650a.patch

---

diff --git a/src/Makefile.defs b/src/Makefile.defs
index a17aa9ecc7..813a8d5344 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)
@@ -1639,7 +1642,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
@@ -1688,9 +1691,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)
@@ -2134,7 +2137,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 \




More information about the sr-dev mailing list