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 7737104585
commit 8a44a6eda2

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 ()