Module: kamailio
Branch: master
Commit: 2938e32cf53c1a31357577f55be5150745eb916d
URL: 
https://github.com/kamailio/kamailio/commit/2938e32cf53c1a31357577f55be5150745eb916d

Author: Xenofon Karamanos <x...@gilawa.com>
Committer: Xenofon Karamanos <x...@gilawa.com>
Date: 2025-08-26T11:18:00Z

cmake: Add mips64 compile options

---

Modified: cmake/compiler-specific.cmake

---

Diff:  
https://github.com/kamailio/kamailio/commit/2938e32cf53c1a31357577f55be5150745eb916d.diff
Patch: 
https://github.com/kamailio/kamailio/commit/2938e32cf53c1a31357577f55be5150745eb916d.patch

---

diff --git a/cmake/compiler-specific.cmake b/cmake/compiler-specific.cmake
index 70109b26e87..362129bb407 100644
--- a/cmake/compiler-specific.cmake
+++ b/cmake/compiler-specific.cmake
@@ -308,6 +308,27 @@ elseif(TARGET_ARCH STREQUAL "mips2")
         "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for ${TARGET_ARCH}. Try 
GCC. Compile at your own risk!"
     )
   endif()
+elseif(TARGET_ARCH STREQUAL "mips64")
+  if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+    target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM)
+    target_compile_options(common_compiler_flags INTERFACE -funroll-loops)
+    if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2)
+      target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize 
-fno-strict-overflow)
+    elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0)
+      target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize)
+    elseif(CMAKE_C_COMPILER_VERSION VERSION_LESS 3.0)
+      message(
+        WARNING
+          "You are using an old and unsupported gcc version 
${CMAKE_C_COMPILER_VERSION}, compile at your own risk!"
+      )
+    endif()
+  else()
+    message(
+      WARNING
+        "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for ${TARGET_ARCH}. Try 
GCC. Compile at your own risk!"
+    )
+  endif()
+
 else()
   message(
     WARNING

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to