Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37354 - vim compiled with -funroll-all-loops gives many errors when reading configuration files
Summary: vim compiled with -funroll-all-loops gives many errors when reading configura...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Vim Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-05 17:22 UTC by Alan Hodgson
Modified: 2004-03-09 02:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Hodgson 2004-01-05 17:22:47 UTC
If I compile vim-6.2-r* and vim-core (any version >= 6.2 anyway) with -funroll-all-loops, it has difficulty reading it's configuration files.

It appears that -funroll-all-loops causes compiled code that differs in functionality from code compiled without the flag and doesn't work correctly.  This option should probably be specifically removed from CFLAGS in the ebuild, unless someone is able to track down the problem in gcc that is causing this behaviour.


Reproducible: Always
Steps to Reproduce:
1. set CFLAGS="-O3 -funroll-all-loops -s -pipe"
2. emerge vim
3. vim any_file

Actual Results:  
gives a bunch of errors while trying to parse syncolor.vim and another config file.

Expected Results:  
not given the errors, which it doesn't if you remove -funroll-all-loops from
CFLAGS and re-emerge.

I'm on an Athlon 64 machine.  Not sure if this problem is specific to this
hardware or not, I don't have an x86 gentoo system handy right now to try.  

I am using gcc 3.3.2-r2.
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-01-08 12:46:05 UTC
Please post output of "emerge --info".  Do you really have -s in your CFLAGS?
Comment 2 Alan Hodgson 2004-01-08 14:06:37 UTC
Normally, yes, but the minimal flags to reproduce this problem appear to be:
  "-02 -funroll-all-loops"

root@hal ahodgson # emerge --info
Portage 2.0.49-r20 (default-amd64-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.0-gentoo)
=================================================================
System uname: 2.6.0-gentoo x86_64 4
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -funroll-all-loops"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS=""
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.ccccom.com ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.seren.com/gentoo http://mirror.tucdemonic.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d aalib acpi alsa amd64 apache2 apm arts avi berkdb cdr crypt cups curl dvd dvdr encode esd fam fbcon foomaticdb gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 imap imlib jpeg junit kde lcms ldap libg++ libwww mad maildir mcal mikmod mmx motif mozilla mpeg multilib mysql ncurses nls nocd oggvorbis opengl pam pdflib perl png postgres python qt quicktime readline samba sasl scanner sdl slang spell sse ssl tcltk tcpd tetex tiff truetype unicode usb videos wmf xinerama xml xml2 xmms xv zlib"
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2004-01-14 14:56:39 UTC
Just fyi, using -s in CFLAGS is a bad idea.  Portage has stripping built in.  You can shut it off via FEATURES=nostrip.  The reason it's bad to put it in your CFLAGS is that you're overriding what might be in the ebuild.  Sometimes the ebuilds shut off stripping because the package can't tolerate it for one reason or another.

I've tested -funroll-all-loops on vim on alpha, it seems to work fine here.  I'd suggest avoiding that flag on your architecture since it will probably cause problems in other programs as well.

I changed vim.eclass to filter -funroll-all-loops on amd64
Comment 4 Franz Pletz 2004-02-01 06:25:12 UTC
I can confirm this bug on x86 with vim-6.2*.
Without --funroll-all-loops everything works fine, but when activated I also get errors while parsing syncolor.vim.


Here is the output of emerge --info:

Portage 2.0.50_pre21 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20040117-r0, 2.6.2-rc3)
=================================================================
System uname: 2.6.2-rc3 i686 AMD Athlon(tm) XP 2400+
Gentoo Base System version 1.4.3.12
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.7.8
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -msse -m3dnow -fcse-follow-jumps -funroll-all-loops"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb:/usr/kde/3.2/share/config:/usr/kde/3.1/share/config:/usr/share/texmf/tex/generic/config/ /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/:/usr/share/config:/var/qmail/control /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -msse -m3dnow -fcse-follow-jumps -funroll-all-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://ftp.gentoo.skynet.be/pub/gentoo/ ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X aalib alsa apache2 apm arts avi berkdb bonobo cdr crypt cups directfb dvd encode esd evo fbcon foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml guile imlib innodb java jpeg ldap libg++ libwww mad mikmod mmx motif mpeg mysql ncurses nls oggvorbis opengl oscar oss pam pdflib perl png python qt qtmt quicktime readline ruby ruby18 samba sdl slang spell sse ssl svga tcltk tcpd tetex tk truetype usb x86 xft xml2 xmms xosd xv zlib"

Comment 5 Andreas Kobara 2004-03-09 02:16:50 UTC
Could someone please reopen this bug, until filter-flags "-funroll-all-loops" is added to the ebuild ?

Hereby I confirm that adding filter-flags works when added to the vim ebuilds in front of "inherit vim" (btw. where is vim inherited from ?)

Regards,
Andy.