summaryrefslogtreecommitdiff
path: root/app-editors/neovim/files/neovim-0.8.0-cmake-release-type.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/neovim/files/neovim-0.8.0-cmake-release-type.patch')
-rw-r--r--app-editors/neovim/files/neovim-0.8.0-cmake-release-type.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/app-editors/neovim/files/neovim-0.8.0-cmake-release-type.patch b/app-editors/neovim/files/neovim-0.8.0-cmake-release-type.patch
new file mode 100644
index 000000000000..8114e2a92b74
--- /dev/null
+++ b/app-editors/neovim/files/neovim-0.8.0-cmake-release-type.patch
@@ -0,0 +1,28 @@
+Ensure that :checkhealth is happy with the Gentoo build type.
+https://bugs.gentoo.org/757744
+--- a/runtime/autoload/health/nvim.vim
++++ b/runtime/autoload/health/nvim.vim
+@@ -135,7 +135,7 @@ function! s:check_performance() abort
+ let buildtype = matchstr(execute('version'), '\v\cbuild type:?\s*[^\n\r\t ]+')
+ if empty(buildtype)
+ call health#report_error('failed to get build type from :version')
+- elseif buildtype =~# '\v(MinSizeRel|Release|RelWithDebInfo)'
++ elseif buildtype =~# '\v(MinSizeRel|Release|RelWithDebInfo|Gentoo)'
+ call health#report_ok(buildtype)
+ else
+ call health#report_info(buildtype)
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -137,12 +137,6 @@ else()
+ message(STATUS "MIN_LOG_LEVEL=${MIN_LOG_LEVEL}")
+ endif()
+
+-# Default to -O2 on release builds.
+-if(CMAKE_C_FLAGS_RELEASE MATCHES "-O3")
+- message(STATUS "Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2")
+- string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
+-endif()
+-
+ if(CMAKE_C_COMPILER_ID MATCHES "GNU")
+ check_c_compiler_flag(-Og HAS_OG_FLAG)
+ else()