View Single Post
  #9  
Old 06-06-2009, 05:27 AM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

Here is the patch I'm using to resolve this problem:

Code:
Index: world/makefile
===================================================================
--- world/makefile      (revision 27)
+++ world/makefile      (revision 28)
@@ -21,6 +21,13 @@
 MYSQL_FLAGS=$(shell mysql_config --cflags)
 MYSQL_LIB=$(shell mysql_config --libs)

+SOFCOPTS=$(WFLAGS) -g -pthread -pipe -I../common/SocketLib \
+  -fauto-inc-dec -fcprop-registers -fdce -fdefer-pop -fdelayed-branch -fdse \
+  -fguess-branch-probability -fif-conversion2 -fif-conversion -finline-small-functions \
+  -fipa-pure-const -fipa-reference -fmerge-constants -fsplit-wide-types -ftree-ccp \
+  -ftree-ch -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-fre \
+  -ftree-sra -ftree-ter -funit-at-a-time -fomit-frame-pointer \
+  -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
 COPTS=$(WFLAGS) -g -O -pthread -pipe -I../common/SocketLib \
   -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
 LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -lm -lz -ldl \
@@ -33,6 +40,9 @@

 include makefile.common

+../common/patches/SoF.o: ../common/patches/SoF.cpp
+        $(CC) $(NOLINK) $(SOFCOPTS) $< $(OUT)$@
+
 .depend depend:
        for f in $(SF); \
        do \
Index: zone/makefile
===================================================================
--- zone/makefile       (revision 27)
+++ zone/makefile       (revision 28)
@@ -18,6 +18,13 @@
 PERL_LIB=$(shell perl -MExtUtils::Embed -e ldopts)
 DFLAGS+=-DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN
 WFLAGS=-fpermissive -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align
+SOFCOPTS=$(WFLAGS) -g \
+  -fauto-inc-dec -fcprop-registers -fdce -fdefer-pop -fdelayed-branch -fdse \
+  -fguess-branch-probability -fif-conversion2 -fif-conversion -finline-small-functions \
+  -fipa-pure-const -fipa-reference -fmerge-constants -fsplit-wide-types -ftree-ccp \
+  -ftree-ch -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-fre \
+  -ftree-sra -ftree-ter -funit-at-a-time -fomit-frame-pointer \
+  -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
 COPTS=$(WFLAGS) -O -g -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
 LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -ldl $(MYSQL_LIB) $(PERL_LIB)

@@ -27,6 +34,9 @@

 include makefile.common

+../common/patches/SoF.o: ../common/patches/SoF.cpp
+        $(CC) $(NOLINK) $(SOFCOPTS) $< $(OUT)$@
+
 .depend depend:
        for f in $(SF); \
        do \
All of the sub-optimization flags of -O did cause the bug with common/patches/SoF.cpp so I included them all when building that one object file. Everything else still builds with -O.
Reply With Quote