Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Changes needed to build non-static binary. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ include(MWLink)
include(PrintInfo)
include(CheckCFlag)
include(MSVCFlags)
include(PreferStatic)
#include(PreferStatic)
include(CMakeDependentOption)
include(CheckFunctionExists)
include(Profiling)
Expand All @@ -79,10 +79,6 @@ include(BOINCPaths)
#These must be after CheckCFlags is included

#TODO: Make sure to use Apple GCC for releases
if(HAVE_FLAG_STATIC_LIBGCC AND NOT APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc")
endif()

if(HAVE_FLAG_PTHREAD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
Expand Down Expand Up @@ -391,9 +387,6 @@ add_subdirectory(lua)
add_subdirectory(dSFMT)
add_definitions("${DSFMT_FLAGS}")

if(SEPARATION_OPENCL)
add_subdirectory(libelf)
endif()

add_subdirectory(openpa)

Expand Down Expand Up @@ -444,7 +437,7 @@ if(BOINC_APPLICATION)
add_subdirectory(boinc)
else()
message(STATUS "Trying to find BOINC")
find_package_static(BOINC REQUIRED)
find_package(BOINC REQUIRED)
endif()

include_directories(${BOINC_INCLUDE_DIR})
Expand Down
6 changes: 3 additions & 3 deletions cmake_modules/CheckSSE2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@ mark_as_advanced(HAVE_AVX)


set(CMAKE_REQUIRED_FLAGS "${SSE41_FLAGS}")
check_include_files(smmintrin.h HAVE_SSE41 CACHE INTERNAL "Compiler has SSE4.1 headers")
check_include_files(smmintrin.h HAVE_SSE41)
mark_as_advanced(HAVE_SSE41)

set(CMAKE_REQUIRED_FLAGS "${SSE3_FLAGS}")
check_include_files(pmmintrin.h HAVE_SSE3 CACHE INTERNAL "Compiler has SSE3 headers")
check_include_files(pmmintrin.h HAVE_SSE3)
mark_as_advanced(HAVE_SSE3)

set(CMAKE_REQUIRED_FLAGS "${SSE2_FLAGS}")
check_include_files(emmintrin.h HAVE_SSE2 CACHE INTERNAL "Compiler has SSE2 headers")
check_include_files(emmintrin.h HAVE_SSE2)
mark_as_advanced(HAVE_SSE2)

set(CMAKE_REQUIRED_FLAGS "")
Expand Down
2 changes: 1 addition & 1 deletion cmake_modules/FindBOINC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ mark_as_advanced(BOINC_INCLUDE_DIR BOINC_LIBRARY )

if(BOINC_FOUND)
set(CMAKE_REQUIRED_INCLUDES ${BOINC_INCLUDE_DIR})
check_struct_has_member("BOINC_OPTIONS" "multi_thread" "boinc_api.h" HAVE_BOINC_OPTIONS_MULTI_THREAD)
check_struct_has_member("BOINC_OPTIONS" "multi_thread" "boinc/boinc_api.h" HAVE_BOINC_OPTIONS_MULTI_THREAD)
if(NOT HAVE_BOINC_OPTIONS_MULTI_THREAD)
message(FATAL_ERROR "Found BOINC libraries too old")
endif()
Expand Down
12 changes: 0 additions & 12 deletions cmake_modules/MWLink.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,6 @@ function(milkyway_link client_bin_name use_boinc use_static link_libs)
set(link_flags "-static ${link_flags}")
endif()

if(HAVE_FLAG_STATIC_LIBSTDCPP)
set(link_flags "${link_flags} -static-libstdc++ ")
else()
if(C_COMPILER_IS_PATHCC)
list(APPEND link_libs stl)
else()
if(NOT WIN32 AND 0)
# We should probably always statically link libstdc++
list(APPEND link_libs stdc++)
endif()
endif()
endif()

set_target_properties(${client_bin_name}
PROPERTIES
Expand Down
1 change: 1 addition & 0 deletions milkyway/include/milkyway_sse2_intrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ static __m128d _mm_pow_pd(__m128d base, __m128d power)
return gmx_mm_exp_pd(power * gmx_mm_log_pd(base));
}

ALWAYS_INLINE
inline __m128d mw_abs_pd(__m128d x)
{
/*Homemade absolute value function. Should work */
Expand Down