!22 修复gcc升级10.3.0之后在docker容器中无法使用vim的问题

From: @tong_1001
Reviewed-by: @licihua,@xxiaosong
Signed-off-by: @licihua
This commit is contained in:
openeuler-ci-bot 2021-08-07 08:36:11 +00:00 committed by Gitee
commit 2b630e8d29
2 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,49 @@
From 7077892a7918845a00ce8d7833b43cc6cbed2081 Mon Sep 17 00:00:00 2001
From: Bram Moolenaar <Bram@vim.org>
Date: Wed, 5 Feb 2020 20:44:24 +0100
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)
---
src/auto/configure | 2 +-
src/configure.ac | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/auto/configure b/src/auto/configure
index 1b5094e972b2..59f3e68d63cf 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -14762,7 +14762,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 a098da82ec84..bf10eac5511b 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -2195,7 +2195,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/`
@@ -4447,7 +4447,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)

View File

@ -12,7 +12,7 @@
Name: vim
Epoch: 2
Version: 8.2
Release: 7
Release: 8
Summary: Vim is a highly configurable text editor for efficiently creating and changing any kind of text.
License: Vim and MIT
URL: http://www.vim.org
@ -34,6 +34,7 @@ Patch0011: vim-8.0-copy-paste.patch
Patch0012: vim-python3-tests.patch
Patch0013: Fix-vim-lua5.4.0-defines+luaL_typeerror-twice.patch
Patch0014: backport-Fix-build-failuers-with-perl-5.32.patch
Patch6000: backport-Configure-does-not-recognize-gcc-10.0-and-later.patch
Patch9000: bugfix-rm-modify-info-version.patch
@ -422,6 +423,12 @@ popd
%{_mandir}/man1/evim.*
%changelog
* Sat Aug 07 2021 shixuantong<shixuantong@huawei> - 2:8.2-8
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix configure does not recognize gcc 10.0 and later
* Sat Jun 12 2021 shixuantong<shixuantong@huawei> - 2:8.2-7
- Type:bugfix
- ID:NA