diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e4c25efc350fdffea121b40c2983c5428d75454..149471af5c5de3e501c3c18582d986327b6925db 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -190,7 +190,7 @@ endif()
 # usable on a system which has only gcc 4.1, statically link with
 # builtin libgcc by default.
 #
-if (CMAKE_COMPILER_IS_GNUCC and not CMAKE_COMPILER_IS_CLANG)
+if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_COMPILER_IS_CLANG)
     add_compile_flags("C;CXX;OBJC;OBJCXX" "-static-libgcc")
 endif()
 
diff --git a/connector/c/tnt/CMakeLists.txt b/connector/c/tnt/CMakeLists.txt
index cdae7dee7165daf0c7204081cee9e446f844c988..657f203a4cb2405a5f7bffd47785d776fc7ab636 100644
--- a/connector/c/tnt/CMakeLists.txt
+++ b/connector/c/tnt/CMakeLists.txt
@@ -47,7 +47,7 @@ set (tnt_sources
 string(REPLACE "-static-libgcc" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 string(REPLACE "-static" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 
-if (CMAKE_COMPILER_IS_GNUCC and not CMAKE_COMPILER_IS_CLANG)
+if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_COMPILER_IS_CLANG)
     set (tnt_cflags "${tnt_cflags} -static-libgcc")
 endif()
 
diff --git a/connector/c/tntnet/CMakeLists.txt b/connector/c/tntnet/CMakeLists.txt
index 46e22f7813fc61f9a9f184bc722482c05addce7b..18c2830d4450506e44b40e38f44347f2e40bb176 100644
--- a/connector/c/tntnet/CMakeLists.txt
+++ b/connector/c/tntnet/CMakeLists.txt
@@ -38,7 +38,9 @@ set (tntnet_sources
 string(REPLACE "-static-libgcc" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 string(REPLACE "-static" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 
-set (tnt_cflags "${tnt_cflags} -static-libgcc")
+if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_COMPILER_IS_CLANG)
+    set (tnt_cflags "${tnt_cflags} -static-libgcc")
+endif()
 
 #
 # Static library
diff --git a/connector/c/tntrpl/CMakeLists.txt b/connector/c/tntrpl/CMakeLists.txt
index 7dc2794ffd174443bf732ca8cad52426dff9a98a..42594df34031178c36f55310851862848d7a8440 100644
--- a/connector/c/tntrpl/CMakeLists.txt
+++ b/connector/c/tntrpl/CMakeLists.txt
@@ -35,7 +35,9 @@ set (tntrpl_sources tnt_log.c tnt_dir.c tnt_xlog.c tnt_snapshot.c tnt_rpl.c
 string(REPLACE "-static-libgcc" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 string(REPLACE "-static" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 
-set (tnt_cflags "${tnt_cflags} -static-libgcc")
+if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_COMPILER_IS_CLANG)
+    set (tnt_cflags "${tnt_cflags} -static-libgcc")
+endif()
 
 #
 # Static library
diff --git a/connector/c/tntsql/CMakeLists.txt b/connector/c/tntsql/CMakeLists.txt
index 655e4e3c371a00f31f62619e374d422afa9a2fcc..2ff74dd62e5614fe5481ac56be1a32f54af6221c 100644
--- a/connector/c/tntsql/CMakeLists.txt
+++ b/connector/c/tntsql/CMakeLists.txt
@@ -37,7 +37,9 @@ set (tntsql_sources
 string(REPLACE "-static-libgcc" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 string(REPLACE "-static" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 
-set (tnt_cflags "${tnt_cflags} -static-libgcc")
+if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_COMPILER_IS_CLANG)
+    set (tnt_cflags "${tnt_cflags} -static-libgcc")
+endif()
 
 #
 # Static library