From 4d91d8d560eb58986c0572ef12ef2a53bb02bd18 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Sat, 17 Nov 2018 02:27:21 +0100 Subject: [PATCH] Fix octopus binary "invalid instruction" (-march too new) (#11822) * This attempts to make the binary more portable by only requiring Sandybridge. * Fix march set to native --- recipes/octopus/fix_march_set_to_native.patch | 12 ++++++++++++ recipes/octopus/meta.yaml | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 recipes/octopus/fix_march_set_to_native.patch diff --git a/recipes/octopus/fix_march_set_to_native.patch b/recipes/octopus/fix_march_set_to_native.patch new file mode 100644 index 0000000000000..b6ab6a8885dce --- /dev/null +++ b/recipes/octopus/fix_march_set_to_native.patch @@ -0,0 +1,12 @@ +diff -rNu octopus-0.5.2-beta.orig/src/CMakeLists.txt octopus-0.5.2-beta/src/CMakeLists.txt +--- octopus-0.5.2-beta.orig/src/CMakeLists.txt 2018-10-29 08:36:32.000000000 -0600 ++++ octopus-0.5.2-beta/src/CMakeLists.txt 2018-11-13 15:54:06.000000000 -0700 +@@ -639,7 +639,7 @@ + else() + add_executable(octopus main.cpp ${OCTOPUS_SOURCES} ${INCLUDE_SOURCES}) + target_compile_features(octopus PRIVATE cxx_thread_local) +- target_compile_options(octopus PRIVATE -ffast-math -funroll-loops -march=native) ++ target_compile_options(octopus PRIVATE -ffast-math -funroll-loops) + target_include_directories(octopus PUBLIC ${octopus_SOURCE_DIR}/lib ${octopus_SOURCE_DIR}/src) + target_link_libraries(octopus tandem ranger) + if (NOT BUILD_SHARED_LIBS) diff --git a/recipes/octopus/meta.yaml b/recipes/octopus/meta.yaml index 36a6a4f081dd3..50cc2b6b726e7 100644 --- a/recipes/octopus/meta.yaml +++ b/recipes/octopus/meta.yaml @@ -7,7 +7,7 @@ package: version: {{ version }} build: - number: 0 + number: 1 # Not building on osx CircleCI and unsure how to fix; does not pick # up 7.2 compilers skip: true # [osx] @@ -15,6 +15,8 @@ build: source: url: https://github.com/luntergroup/{{ name }}/archive/v0.5.2-beta.tar.gz sha256: {{ sha256 }} + patches: + - fix_march_set_to_native.patch requirements: build: