diff --git a/vim-8.2-configure-does-not-recognize-gcc-10.0.patch b/vim-8.2-configure-does-not-recognize-gcc-10.0.patch new file mode 100644 index 0000000000000000000000000000000000000000..136a76e90bae9f7592a8c076c3920b3d409333c4 --- /dev/null +++ b/vim-8.2-configure-does-not-recognize-gcc-10.0.patch @@ -0,0 +1,66 @@ +From 6b9c1662eb49612bbcfc3e07167cbde7c4ec6aef Mon Sep 17 00:00:00 2001 +From: Weisson +Date: Mon, 20 Nov 2023 16:40:44 +0800 +Subject: [PATCH] patch 8.2.0213: configure does not recognize gcc 10.0 and + later + +Problem: Configure does not recognize gcc 10.0 and later. +Solution: Adjust the pattern matching the version number. (Sergei + Trofimovich, closes #5580) +Signed-off-by: Weisson +--- + src/auto/configure | 2 +- + src/configure.ac | 4 ++-- + src/version.c | 2 ++ + 3 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/auto/configure b/src/auto/configure +index a0e9ea5..0c4c9c3 100755 +--- a/src/auto/configure ++++ b/src/auto/configure +@@ -14686,7 +14686,7 @@ DEPEND_CFLAGS_FILTER= + if test "$GCC" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5 + $as_echo_n "checking for GCC 3 or later... " >&6; } +- gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9]\)\..*$/\1/g'` ++ gccmajor=`echo "$gccversion" | sed -e 's/^\([0-9]\+\)\..*$/\1/g'` + if test "$gccmajor" -gt "2"; then + DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +diff --git a/src/configure.ac b/src/configure.ac +index 5e45762..73ef5e9 100644 +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -2204,7 +2204,7 @@ else + fi + + dnl On my HPUX system the X include dir is found, but the lib dir not. +- dnl This is a desparate try to fix this. ++ dnl This is a desperate try to fix this. + + if test -d "$x_includes" && test ! -d "$x_libraries"; then + x_libraries=`echo "$x_includes" | sed s/include/lib/` +@@ -4424,7 +4424,7 @@ dnl the number before the version number. + DEPEND_CFLAGS_FILTER= + if test "$GCC" = yes; then + AC_MSG_CHECKING(for GCC 3 or later) +- gccmajor=`echo "$gccversion" | sed -e 's/^\([[1-9]]\)\..*$/\1/g'` ++ gccmajor=`echo "$gccversion" | sed -e 's/^\([[0-9]]\+\)\..*$/\1/g'` + if test "$gccmajor" -gt "2"; then + DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" + AC_MSG_RESULT(yes) +diff --git a/src/version.c b/src/version.c +index f5d4c5a..2ae07d2 100644 +--- a/src/version.c ++++ b/src/version.c +@@ -761,6 +761,8 @@ static char *(features[]) = + + static int included_patches[] = + { /* Add new patch number below this line */ ++/**/ ++ 232, + /**/ + 1763, + /**/ +-- +2.31.1 \ No newline at end of file diff --git a/vim.spec b/vim.spec index 4dc0a5b3e60cc84fd654bb9b2033531ff4e33962..4ab2a9e7997e740150ce6e5c7b083317df1bf8a9 100644 --- a/vim.spec +++ b/vim.spec @@ -25,7 +25,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{patchlevel} -Release: 19%{anolis_release}%{?dist}.5 +Release: 19%{anolis_release}%{?dist}.6 License: Vim and MIT Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2 Source1: vim.sh @@ -119,6 +119,9 @@ Patch3040: 0001-patch-8.2.5037-cursor-position-may-be-invalid-after-.patch Patch10000: 0001-vim-anolis-build-with-ruby26.patch # End Patch10001: vim80-sw.patch +%ifarch sw_64 +Patch10002: vim-8.2-configure-does-not-recognize-gcc-10.0.patch +%endif # gcc is no longer in buildroot by default BuildRequires: gcc @@ -339,6 +342,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch10000 -p1 %patch10001 -p1 +%patch10002 -p1 %build %if 0%{?rhel} > 7 export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 @@ -856,6 +860,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %{_datadir}/icons/locolor/*/apps/* %changelog +* Mon Nov 20 2023 Weisson - 2:8.0.1763-19.0.2.5 +- add support for gcc having version beyond 10.0. + * Fri May 12 2023 wxiat - 2:8.0.1763-19.0.1.5 - add sw patch