Fix/fbsd gcc13 error (#338)

* added static libraries in cmake to fix unit-internal seg fault in freebsd, ppc64le, gcc13 error
* Moved gcc13 flags for freebsd-gcc13 in cmake/cflags-ppc64le.make
This commit is contained in:
Chrysovalantis - Michail Liakopoulos 2025-05-31 11:46:22 +03:00 committed by GitHub
parent f7d5546fe5
commit c057c7f0f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,3 +16,12 @@ int main() {
if (NOT HAVE_VSX) if (NOT HAVE_VSX)
message(FATAL_ERROR "VSX support required for Power support") message(FATAL_ERROR "VSX support required for Power support")
endif () endif ()
# fix unit-internal seg fault for freebsd and gcc13
if (FREEBSD AND CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "13")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
endif ()
endif ()