To: vim-dev@vim.org Subject: Patch 6.1.104 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.104 Problem: GCC 3.1 appears to have an optimizer problem that makes test 3 crash. Solution: For GCC 3.1 add -fno-strength-reduce to avoid the optimizer bug. Filter out extra info from "gcc --version". Files: src/auto/configure, src/configure.in *** ../vim61.103/src/configure.in Sat Jun 8 19:05:54 2002 --- src/configure.in Tue Jun 11 22:17:45 2002 *************** *** 1,6 **** --- 1,7 ---- dnl configure.in: autoconf script for Vim dnl Process this file with autoconf 2.12 or 2.13 to produce "configure". + dnl Does NOT work with autoconf 2.50 - 2.53! AC_INIT(vim.h) AC_CONFIG_HEADER(auto/config.h:config.h.in) *************** *** 27,36 **** test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" fi if test "$GCC" = yes; then ! gccversion=`"$CC" --version` if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2"; then echo 'GCC 3.0.x has a bug in the optimizer, disabling "-O#"' CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-O/'` fi fi --- 28,42 ---- test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" fi if test "$GCC" = yes; then ! gccversion=`"$CC" --version | sed -e '2,$d;s/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'` if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2"; then echo 'GCC 3.0.x has a bug in the optimizer, disabling "-O#"' CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-O/'` + else + if test "$gccversion" = "3.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then + echo 'GCC 3.1 has a bug in the optimizer, adding "-fno-strength-reduce"' + CFLAGS="$CFLAGS -fno-strength-reduce" + fi fi fi *** ../vim61.103/src/auto/configure Sat Jun 8 19:05:54 2002 --- src/auto/configure Tue Jun 11 22:17:49 2002 *************** *** 1113,1122 **** test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" fi if test "$GCC" = yes; then ! gccversion=`"$CC" --version` if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2"; then echo 'GCC 3.0.x has a bug in the optimizer, disabling "-O#"' CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'` fi fi --- 1113,1127 ---- test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" fi if test "$GCC" = yes; then ! gccversion=`"$CC" --version | sed -e '2,$d;s/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'` if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2"; then echo 'GCC 3.0.x has a bug in the optimizer, disabling "-O#"' CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'` + else + if test "$gccversion" = "3.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then + echo 'GCC 3.1 has a bug in the optimizer, adding "-fno-strength-reduce"' + CFLAGS="$CFLAGS -fno-strength-reduce" + fi fi fi *** ../vim61.103/src/version.c Sun Jun 23 13:09:02 2002 --- src/version.c Sun Jun 23 14:23:09 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 104, /**/ -- ZOOT: I'm afraid our life must seem very dull and quiet compared to yours. We are but eightscore young blondes, all between sixteen and nineteen-and-a-half, cut off in this castle, with no one to protect us. Oooh. It is a lonely life ... bathing ... dressing ... undressing ... making exciting underwear.... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///