--- src/Makevars.in 2023-05-14 01:31:56.000000000 +0800 +++ src/Makevars.in 2024-03-28 03:36:26.000000000 +0800 @@ -1,2 +1,2 @@ -PKG_LIBS= -L@RHIGHS_LIB_DIR@/lib -L@RHIGHS_LIB_DIR@/lib64 -lhighs -PKG_CPPFLAGS=-I@RHIGHS_LIB_DIR@/include -I@RHIGHS_LIB_DIR@/include/highs +PKG_LIBS= -L@RHIGHS_LIB_DIR@/lib -lhighs -latomic +PKG_CPPFLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -I@RHIGHS_LIB_DIR@/include -I@RHIGHS_LIB_DIR@/include/highs --- inst/HiGHS/CMakeLists.txt 2023-05-14 01:32:16.000000000 +0800 +++ inst/HiGHS/CMakeLists.txt 2024-03-28 04:16:09.000000000 +0800 @@ -135,8 +135,6 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86\_64|i686)") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt") -elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64|powerpc64)") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcntd") else() message("FLAG_MPOPCNT_SUPPORTED is not available on this architecture") endif() @@ -184,6 +182,11 @@ endif(CMAKE_CSharp_COMPILER) endif() +if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0 -Wl,-latomic") + set (CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -latomic") +endif() + check_cxx_compiler_flag("-fno-omit-frame-pointer" NO_OMIT_FRAME_POINTER_FLAG_SUPPORTED) if(NO_OMIT_FRAME_POINTER_FLAG_SUPPORTED) set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS_RELEASE} -fno-omit-frame-pointer")