File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ if (BUILD_STATIC)
6767 # Build internal libraries as static instead of shared
6868 set (DNA_LIBRARY_TYPE STATIC )
6969
70+ # For maximum portability, statically link libstdc++ and libgcc
71+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc" )
72+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++ -static-libgcc" )
73+
7074 # Include static build optimizations
7175 include (${CMAKE_CURRENT_LIST_DIR} /cmake/StaticBuildOptimizations.cmake)
7276
@@ -572,9 +576,6 @@ if(BUILD_STATIC)
572576 message ("" )
573577 message (STATUS "STATIC_LIBS_LIST=${STATIC_LIBS_LIST} " )
574578
575- # For maximum portability, statically link libstdc++ and libgcc
576- add_link_options (-static -libstdc++ -static -libgcc)
577-
578579 # Find static versions of xerces-c dependencies (curl and ICU)
579580 find_library (CURL_STATIC_LIB NAMES libcurl.a HINTS
580581 ENV LIBRARY_PATH /g/data/ms9/.envbin/lib /usr/lib64 /usr/lib)
You can’t perform that action at this time.
0 commit comments