aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2020-09-22 07:16:50 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2020-09-22 07:16:50 +0000
commit983daa91f437ee9c99e3a26ee7ff5e1c5ee14b94 (patch)
tree53d78a4121b505f291eeaae7a80197a0f0c556eb /math
parent1070309bcdaa2eaf6a7954e48330200128f37d0d (diff)
downloadports-983daa91f437ee9c99e3a26ee7ff5e1c5ee14b94.tar.gz
ports-983daa91f437ee9c99e3a26ee7ff5e1c5ee14b94.zip
math/flann: Fix build on 11
clang-8 in FreeBSD 11 doesn't know -Wl,--push-state / -Wl,--pop-state Reported by: fallout MFH: 2020Q3
Notes
Notes: svn path=/head/; revision=549561
Diffstat (limited to 'math')
-rw-r--r--math/flann/files/patch-src_cpp_CMakeLists.txt30
1 files changed, 29 insertions, 1 deletions
diff --git a/math/flann/files/patch-src_cpp_CMakeLists.txt b/math/flann/files/patch-src_cpp_CMakeLists.txt
index 39984b51cc24..64411160754e 100644
--- a/math/flann/files/patch-src_cpp_CMakeLists.txt
+++ b/math/flann/files/patch-src_cpp_CMakeLists.txt
@@ -1,6 +1,6 @@
--- src/cpp/CMakeLists.txt.orig 2019-04-07 03:21:23 UTC
+++ src/cpp/CMakeLists.txt
-@@ -25,6 +25,6 @@ if (BUILD_CUDA_LIB)
+@@ -25,7 +25,7 @@ if (BUILD_CUDA_LIB)
else()
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};" )
endif()
@@ -8,3 +8,31 @@
+ cuda_add_library(flann_cuda_s SHARED ${CU_SOURCES})
set_property(TARGET flann_cuda_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC)
endif()
+
+@@ -43,7 +43,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPIL
+ endif()
+ else()
+ add_library(flann_cpp SHARED ${CPP_SOURCES})
+- target_link_libraries(flann_cpp -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state)
++ target_link_libraries(flann_cpp -Wl,--no-as-needed ${LZ4_LIBRARIES}) # clang-8 in FreeBSD 11 doesn't know -Wl,--push-state / -Wl,--pop-state
+ # export lz4 headers, so that MSVC to creates flann_cpp.lib
+ set_target_properties(flann_cpp PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS YES)
+ if (BUILD_CUDA_LIB)
+@@ -81,7 +81,7 @@ endif()
+
+ if (BUILD_C_BINDINGS)
+ add_library(flann_s STATIC ${C_SOURCES})
+- target_link_libraries(flann_s -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state)
++ target_link_libraries(flann_s -Wl,--no-as-needed ${LZ4_LIBRARIES})
+ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
+ set_target_properties(flann_s PROPERTIES COMPILE_FLAGS -fPIC)
+ endif()
+@@ -93,7 +93,7 @@ if (BUILD_C_BINDINGS)
+ target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
+ else()
+ add_library(flann SHARED ${C_SOURCES})
+- target_link_libraries(flann -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state)
++ target_link_libraries(flann -Wl,--no-as-needed ${LZ4_LIBRARIES})
+
+ if(MINGW AND OPENMP_FOUND)
+ target_link_libraries(flann gomp)