From 26420efbfdab07a1de31945bbe3bfe6f80b7f037 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Mon, 29 Apr 2024 04:13:04 +0200 Subject: [PATCH] build: fix libgcc_s.so.1 issue --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cb79f3d..09129a51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,10 +287,13 @@ if (WIN32) endif() if(STATIC) -# add_linker_flag_if_supported(-static-libgcc STATIC_FLAGS) -# add_linker_flag_if_supported(-static-libstdc++ STATIC_FLAGS) if(MINGW) add_linker_flag_if_supported(-static STATIC_FLAGS) + elseif (NOT (APPLE OR FREEBSD OR OPENBSD OR DRAGONFLY)) + if(NOT "${ARCH}" STREQUAL "armv7-a") + add_linker_flag_if_supported(-static-libgcc STATIC_FLAGS) + add_linker_flag_if_supported(-static-libstdc++ STATIC_FLAGS) + endif() endif() endif() -- 2.52.0