home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.0.160 < prev    next >
Encoding:
Internet Message Format  |  2002-01-31  |  2.3 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.160
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.0.160
  11. Problem:    When compiling with GCC 3.0.2 and using the "-O2" argument, the
  12.         optimizer causes a problem that makes Vim crash.
  13. Solution:   Add a configure check to avoid "-O2" for this version of gcc.
  14. Files:        src/configure.in, src/auto/configure
  15.  
  16.  
  17. *** ../vim60.159/src/configure.in    Tue Jan 22 15:38:17 2002
  18. --- src/configure.in    Tue Jan 22 19:46:56 2002
  19. ***************
  20. *** 26,31 ****
  21. --- 26,38 ----
  22.     CFLAGS="-O"
  23.     test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
  24.   fi
  25. + if test "$GCC" = yes; then
  26. +   gccversion=`"$CC" --version`
  27. +   if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2"; then
  28. +     echo 'GCC 3.0.x has a bug in the optimizer, disabling "-O#"'
  29. +     CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-O/'`
  30. +   fi
  31. + fi
  32.   
  33.   dnl If configure thinks we are cross compiling, there is probably something
  34.   dnl wrong with the CC or CFLAGS settings, give an understandable error message
  35. *** ../vim60.159/src/auto/configure    Tue Jan 22 15:38:17 2002
  36. --- src/auto/configure    Wed Jan 30 16:19:19 2002
  37. ***************
  38. *** 1112,1117 ****
  39. --- 1112,1124 ----
  40.     CFLAGS="-O"
  41.     test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
  42.   fi
  43. + if test "$GCC" = yes; then
  44. +   gccversion=`"$CC" --version`
  45. +   if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2"; then
  46. +     echo 'GCC 3.0.x has a bug in the optimizer, disabling "-O#"'
  47. +     CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
  48. +   fi
  49. + fi
  50.   
  51.   if test "$cross_compiling" = yes; then
  52.     { echo "configure: error: cannot compile a simple program, check CC and CFLAGS
  53. *** ../vim60.159/src/version.c    Fri Feb  1 20:15:57 2002
  54. --- src/version.c    Fri Feb  1 20:16:14 2002
  55. ***************
  56. *** 608,609 ****
  57. --- 608,611 ----
  58.   {   /* Add new patch number below this line */
  59. + /**/
  60. +     160,
  61.   /**/
  62.  
  63. -- 
  64. hundred-and-one symptoms of being an internet addict:
  65. 150. You find yourself counting emoticons to get to sleep.
  66.  
  67.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  68. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  69.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  70.