Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73984 - LyX fails to build with "-Os"
Summary: LyX fails to build with "-Os"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Text-Markup Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-10 00:39 UTC by Jonathan Rogers
Modified: 2005-02-08 03:25 UTC (History)
0 users

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


Attachments
causes LyX to be built with "-O2" instead of "-Os" (lyx-1.3.5_no-Os.diff,718 bytes, patch)
2004-12-10 00:41 UTC, Jonathan Rogers
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Rogers 2004-12-10 00:39:37 UTC
I get an internal compiler error when I try to merge LyX 1.3.5 with "-Os".

Reproducible: Always
Steps to Reproduce:
1. Add "-Os" to CFLAGS in make.conf
2. emerge lyx
3. wait

Actual Results:  
GCC complains of an internal error.

Expected Results:  
LyX is now merged and functional.

emerge --info:

Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.6.9-rc1-mm5 i686)
=================================================================
System uname: 2.6.9-rc1-mm5 i686 AMD Duron(tm) Processor
Gentoo Base System version 1.4.16
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux-headers-2.4.19-r1,sys-kernel/linux-headers-2.4.21-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-tbird -Os -pipe -fstack-protector -fforce-addr"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/mozilla/defaults/pref /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/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-tbird -Os -pipe -fstack-protector -fforce-addr"
DISTDIR="/var/cache/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict userpriv
usersandbox"
GENTOO_MIRRORS="http://gentoo.seren.com/gentoo http://www.ibiblio.org/gentoo
ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/var/cache/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cache/portage"
PORTDIR_OVERLAY="/var/cache/bmg-main /home/jrogers/ebuilds
/usr/local/overlays/deltup"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="3dnow X aalib acpi alsa apache2 apm auctex avi berkdb bitmap-fonts bonobo
caps cdr chroot clisp cmucl crypt cups dga dillo directfb dnd dvd encode esd f77
fam fbcon flac foomaticdb fortran gatos gdbm geoip ggi gif gimpprint gnome
gstreamer gtk gtk2 gtkhtml guile imagemagick imap imlib ipv6 jack java
javascript jikes jpeg junit ladcca lcms libg++ libwww mad maildir matroska mbox
mdb mikmod mitshm mmx mng mozilla moznoirc mozp3p mozsvg mozxmlterm mpeg music
mysql ncurses odbc ofx oggvorbis openal opengl oss pam parse-clocks pcre pdflib
plotutils png postgres ppds python qt qtmt quicktime radeon readline samba sdl
slang snmp spell sqlite ssl stencil-buffer stroke tcltk tcpd tetex theora tiff
transcode truetype v4l v4l2 wmf wxwindows x86 xface xfs xine xml xml2 xmms xv
xvid zlib video_cards_radeon"
Comment 1 Jonathan Rogers 2004-12-10 00:41:57 UTC
Created attachment 45665 [details, diff]
causes LyX to be built with "-O2" instead of "-Os"

This patch allows a successful build on my system.
Comment 2 Sergey Kuleshov (RETIRED) gentoo-dev 2004-12-10 02:20:44 UTC
Works fine for me with these flags:

CFLAGS="-Os -mcpu=i686 -fomit-frame-pointer"
CXXFLAGS="-Os -mcpu=i686 -fomit-frame-pointer"

Probably it's athlon specific issue?
Comment 3 Jonathan Rogers 2004-12-10 19:58:35 UTC
Since I seem to have found a bug in GCC, it's not at all surprising that it only triggers with certain CPU models.
Comment 4 laughingplant 2004-12-11 16:55:34 UTC
I see the same result on a pentium4. It didn't work with the following CFLAGS:

    CFLAGS="-Os -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -ffast-math -fomit-frame-pointer -pipe"
    CFLAGS="-Os -march=pentium4"
    CFLAGS="-Os"

It did, however, work with

    CFLAGS="-O2 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -ffast-math -fomit-frame-pointer -pipe".

So, it really seems to be related to some flag inside -Os.
Comment 5 Mamoru KOMACHI (RETIRED) gentoo-dev 2005-02-08 03:25:14 UTC
Okay. Thanks for the bug report. 
I filtered "-Os" from lyx-1.3.5.ebuild.
Hope some of you get benefits from this change.