The development versions of gimp segfaults while loading fonts when it's compiled with the -Os flag. I suggest a 'filter-flag -Os' line is added to the ebuild. The protection against overoptimisation (which is now commented out) seems to be a good idea, though I don't know whetver changing -Os to -O2 will work. Filtering -Os out does work (at least for me).
Please post emerge info, what CFLAGS did you build with ? What gcc version etc.
emerge info: System uname: 2.6.0 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.4.3.12 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-Os -s -mcpu=athlon-tbird -march=athlon-tbird -mmmx -m3dnow -pipe -fomit-frame-pointer -fforce-addr -DNDEBUG -DG_DISABLE_ASSERT -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /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/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-Os -s -mcpu=athlon-tbird -march=athlon-tbird -mmmx -m3dnow -pipe -fforce-addr -DNDEBUG -DG_DISABLE_ASSERT -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow X aalib alsa apache2 apm avi berkdb bindist bonobo cdr crypt cups curl encode esd ethereal fbcon flash foomaticdb gd gdbm gdm gif gnome gpm gtk gtk2 guile imlib ipv6 java jpeg libg++ libwww mad maildir mbox mikmod mmx motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl plotutils png python quicktime readline samba scanner sdl slang spell ssl svga tcltk tcpd tetex threads tiff truetype x86 xml xml2 xmms xv zlib"
Please build with sane CFLAGS, something like: CFLAGS="-march=i686 -O2 -pipe" emerge gimp
Ok, here are the results: -march=i686 -O2 -pipe: works -O2 -s -mcpu=athlon-tbird -march=athlon-tbird -mmmx -m3dnow -pipe -fomit-frame-pointer -fforce-addr: doesn't work. Maybe it would be a good idea to filter out any O-flags when -mcpu and -march are set to athlon-tbird? Or just change athlon-tbird to i686?
As far as I know -mmmx and -m3dnow is not required since it's already part of -march=archtype. I agree that it is a good idea to force sane cflags on bigger projects.
I try to emerge gimp-2.0_pre2 with CFLAGS="-march=i686 -O2 -pipe" on my machine (Athlon XP), but without luck. A segfault occur while loading the fonts.
Perhaps it would be best to just have -O2 and -Os replaced with -O1 in the ebuild..
I don't think so, it's probably some other flag causing this. I can build it just fine with any of the Ox's . @comment 6 , will lowering your optimizations make it work or is it another problem altogether ?
Update: gimp-2.0_pre3 works fine with my flags from comment 2. But I'd wait at least till next version before closing this bug. I remember that one of the 1.3.x versions worked too, but the next release had problems again.
Well i won't wait, reopen if you actually have problems.