CFLAGS=-O3 ... for Gnucash 1.4.7 doesn't work.

Arnold Troeger stssart@bkk.unocal.com
Wed, 04 Oct 2000 13:41:58 +0700


I tried something last night while building the gnucash 1.4.7 rpm for
Mandrake 7.0.  I changed the CFLAGS environment variable to "i586 -O3
-fomit-frame-pointer -fno-exceptions -fno-rtti -pipe -s -mpentium
-mcpu=pentium -march=pentium -ffast-math -fexpensive-optimizations
-malign-loops=2 -malign-jumps=2 -malign-functions=2
-mpreferred-stack-boundary=2."  These are the default compiler options
in the rpmrc file and will be used when building the rpm if you put
"CFLAGS=$RPM_OPT_FLAGS" before "./configure ..." in the %build section
of the rpm spec file.  Gnucash did not seem to like those compiler
options.  The first thing I noticed wrong was in the register window, my
new entries were sorting themselves in a different order than I was
entering them.  I immediately exited, rebuilt the rpm file without the
CFLAGS statement, reinstalled and everything worked properly.   The
behavior was definitely corrected by reducing the optimization, but I'm
curious as to what does go wrong at higher optimizations.  Has anyone
else tried this and if so, what did you decide?

Best regards,
Arnold

--
Arnold Troeger                          Unocal Thailand
Phone:  011-66-2-545-5456               5th Floor, Tower 3, SCB Park Plaza
FAX:    011-66-2-545-5374               19 Ratchadapisek Road, Chatuchak
Email:  Arnold.Troeger@bkk.unocal.com   Bangkok 10900, Thailand
------------------------------------------------------------------------
"Microsoft Windows:  for when your machine is just too fast"