- vim doesn't support -D_FORTIFY_SOURCE=2 , we must use level 1,

see http://goo.gl/g9d8F for details.

OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=76
This commit is contained in:
Ismail Dönmez 2011-12-02 19:34:31 +00:00 committed by Git OBS Bridge
parent 2bce514768
commit de19617124
3 changed files with 8 additions and 26 deletions

View File

@ -1,17 +0,0 @@
--- vim73/src/eval.c 2011-05-17 09:45:26.743007190 +0200
+++ vim73/src/eval.c 2011-05-17 09:47:29.964007193 +0200
@@ -11,6 +11,14 @@
* eval.c: Expression evaluation.
*/
+// This workaround disable the GCC compiler warning only in this code file
+// because the code is safe.
+// http://lists.opensuse.org/opensuse-packaging/2010-11/msg00182.html
+#ifdef _FORTIFY_SOURCE
+#undef _FORTIFY_SOURCE
+#define _FORTIFY_SOURCE 1
+#endif
+
#include "vim.h"
#if defined(FEAT_EVAL) || defined(PROTO)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Dec 2 19:33:41 UTC 2011 - idoenmez@suse.de
- vim doesn't support -D_FORTIFY_SOURCE=2 , we must use level 1,
see http://goo.gl/g9d8F for details.
-------------------------------------------------------------------
Tue Nov 29 12:33:04 UTC 2011 - aj@suse.de

View File

@ -112,7 +112,6 @@ Patch19: %{name}-7.3-diff_check.patch
Patch21: %{name}-7.3-filetype_changes.patch
Patch22: %{name}-7.3-filetype_mine.patch
Patch25: vim-7.2-lzma-support.patch
Patch27: %{name}-7.3-disable_gcc_warning_eval_c.patch
Patch100: vim-7.1.314-CVE-2009-0316-debian.patch
Patch101: vim73-no-static-libpython.patch
@ -278,7 +277,6 @@ cp %{SOURCE23} runtime/syntax/apparmor.vim
%patch21 -p1
%patch22 -p1
#%patch25
%patch27 -p1
%patch100 -p1
%patch101
cp %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE8} %{SOURCE10} .
@ -287,9 +285,8 @@ cp %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE8} %{SOURCE10} .
%build
export CFLAGS="%{optflags} -Wall -pipe -fno-strict-aliasing"
%if 0%{?suse_version} > 1000
export CFLAGS="$CFLAGS -fstack-protector-all"
%endif
export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=1}
export COMMON_OPTIONS="\
--with-vim-name=vim \
--with-ex-name=ex \
@ -468,10 +465,6 @@ mkdir -p %{buildroot}/var/run/vi.recover
%fdupes -s %{buildroot}%{_datadir}/vim/%{VIM_SUBDIR}/ftplugin
%endif
%clean
rm -rf %{buildroot}
# link name | name | binary | priority
%post
/usr/sbin/update-alternatives --install \
/bin/vim vim /bin/vim-normal 15