Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35809 - zinf have trouble with -O2 on amd64
Summary: zinf have trouble with -O2 on amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-14 09:52 UTC by hendrik
Modified: 2004-02-22 12:06 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 hendrik 2003-12-14 09:52:00 UTC
current zinf-2.2.4 and amd64 errors with:
g++ -DHAVE_CONFIG_H -I. -I. -I../../config -D_REENTRANT -I../../base/include -I../../base/unix/include -I../../lib/utf8 -I../../ui/include -I../../lmc/include -I../../io/include -I./include -I../../lib/xml/include -I../../lib/unzip/include -I../../lib/http/include -I../../ui/musicbrowser/unix/include -I/usr/include/freetype -I./unix/include -D_REENTRANT -I/usr/include/gtk-1.2 -I/usr/X11R6/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/gdk-pixbuf-1.0 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -O2 -pipe -MT Panel.lo -MD -MP -MF .deps/Panel.Tpo -c src/Panel.cpp  -fPIC -DPIC -o Panel.lo
/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.2/include/g++-v3/x86_64-pc-linux-gnu/bits/atomicity.h: In
   member function `void Panel::GetControlToolTips(std::vector<std::pair<Rect, 
   std::string>, std::allocator<std::pair<Rect, std::string> > >&)':
/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.2/include/g++-v3/x86_64-pc-linux-gnu/bits/atomicity.h:40: error: inconsistent
   operand constraints in an `asm'
make[3]: *** [Panel.lo] Error 1

but adding --disable-x86opts to ./configure fixes that

Reproducible: Always
Steps to Reproduce:
1. logon to and amd64
2. emerge zinf-2.2.4
3. wait and notice error :)

Actual Results:  
errors as in details

Expected Results:  
properly compiled and installed program ;^)

Portage 2.0.49-r18 (default-amd64-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.0-test11-g
entoo-r2)
=================================================================
System uname: 2.6.0-test11-gentoo-r2 x86_64 4
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe"
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 /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://gentoo.noved.org/ http://gentoo.noved.org/ ftp://gentoo.li
nux.no/pub/gentoo/ http://gentoo.linux.no/"
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 alsa amd64 apm arts avi berkdb cdr crypt encode esd foomaticdb gdbm
 gif gnome gpm gtk gtk2 imlib jpeg kde libg++ libwww mikmod mmx motif mozilla mp
eg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime read
line sdl slang spell sse ssl tcpd tetex truetype xml2 xmms xv zlib"
Comment 1 hendrik 2003-12-14 13:47:10 UTC
Testing conditions not always as equal with a cd /var/tmp./portage/zinf....

Anycase, -O1, -O2, -O3 do cause a problem with the atomicity.h which isn't there with -O0 :(

see http://gcc.gnu.org/ml/libstdc++/2003-06/msg00270.html for some of the problem behind the problem ...

What works inside the ebuild:
        if [ $ARCH == "amd64" ]; then 
         replace-flags -O? -O
         append-flags -frerun-cse-after-loop
        fi


Comment 2 Daniel Ahlberg (RETIRED) gentoo-dev 2004-02-22 12:06:52 UTC
In CVS, thanks!