Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-10-2009, 08:17 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default Patches for 64bit linux

I'll be posting patches to improve compatibility with 64bit linux compiles in this thread.

First up, makefile changes to allow it to begin compiling.

Code:
Index: eqlaunch/makefile
===================================================================
--- eqlaunch/makefile   (revision 1)
+++ eqlaunch/makefile   (revision 2)
@@ -10,11 +10,11 @@
 LINKOUT=-o
 NOLINK=-c
 LINKER=gcc
-MYSQL_FLAGS=-I/usr/include/mysql
-MYSQL_LIB=-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv -lc -lnss_files -lnss_dns -lresolv
+MYSQL_FLAGS=$(shell mysql_config --cflags)
+MYSQL_LIB=$(shell mysql_config --libs)
 DFLAGS=-DEQDEBUG=5
 WFLAGS=-Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated  -Wcomment -Wcast-align
-COPTS=$(WFLAGS) -O -g -march=i686 -pthread -pipe -DEQLAUNCH $(DFLAGS) $(MYSQL_FLAGS)
+COPTS=$(WFLAGS) -O -g -pthread -pipe -DEQLAUNCH $(DFLAGS) $(MYSQL_FLAGS)
 LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -ldl $(MYSQL_LIB)

 all: eqlaunch
Index: chatserver/makefile
===================================================================
--- chatserver/makefile (revision 1)
+++ chatserver/makefile (revision 2)
@@ -21,7 +21,7 @@
 MYSQL_FLAGS=$(shell mysql_config --cflags)
 MYSQL_LIB=$(shell mysql_config --libs)

-COPTS=$(WFLAGS) -g -march=i686 -pthread -pipe -I../common/SocketLib \
+COPTS=$(WFLAGS) -g -pthread -pipe -I../common/SocketLib \
   -DFX -D_GNU_SOURCE -DINVERSEXY $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
 LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -lm -lz -ldl \
   $(MYSQL_LIB) $(PERL_LIB)
Index: world/makefile
===================================================================
--- world/makefile      (revision 1)
+++ world/makefile      (revision 2)
@@ -21,7 +21,7 @@
 MYSQL_FLAGS=$(shell mysql_config --cflags)
 MYSQL_LIB=$(shell mysql_config --libs)

-COPTS=$(WFLAGS) -g -march=i686 -O -pthread -pipe -I../common/SocketLib \
+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 \
   $(MYSQL_LIB) $(PERL_LIB)
Index: mailserver/makefile
===================================================================
--- mailserver/makefile (revision 1)
+++ mailserver/makefile (revision 2)
@@ -21,7 +21,7 @@
 MYSQL_FLAGS=$(shell mysql_config --cflags)
 MYSQL_LIB=$(shell mysql_config --libs)

-COPTS=$(WFLAGS) -g -march=i686 -pthread -pipe -I../common/SocketLib \
+COPTS=$(WFLAGS) -g -pthread -pipe -I../common/SocketLib \
   -DFX -D_GNU_SOURCE -DINVERSEXY $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
 LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -lm -lz -ldl \
   $(MYSQL_LIB) $(PERL_LIB)
Index: zone/makefile
===================================================================
--- zone/makefile       (revision 1)
+++ zone/makefile       (revision 2)
@@ -10,15 +10,15 @@
 LINKOUT=-o
 NOLINK=-c
 LINKER=gcc
-MYSQL_FLAGS=-I/usr/include/mysql
-MYSQL_LIB=-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv -lc -lnss_files -lnss_dns -lresolv
+MYSQL_FLAGS=$(shell mysql_config --cflags)
+MYSQL_LIB=$(shell mysql_config --libs)
 DFLAGS=-DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -Di386
 #try commenting out the following three lines to disable embedded perl
 PERL_FLAGS=perl -MExtUtils::Embed -e ccopts
 PERL_LIB=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
-COPTS=$(WFLAGS) -O -g -march=i686 -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)`

 all: zone
Index: ucs/makefile
===================================================================
--- ucs/makefile        (revision 30)
+++ ucs/makefile        (revision 31)
@@ -21,7 +21,7 @@
 MYSQL_FLAGS=$(shell mysql_config --cflags)
 MYSQL_LIB=$(shell mysql_config --libs)

-COPTS=$(WFLAGS) -g -march=i686 -pthread -pipe -I../common/SocketLib \
+COPTS=$(WFLAGS) -g -pthread -pipe -I../common/SocketLib \
   -DFX -D_GNU_SOURCE -DINVERSEXY $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
 LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -lm -lz -ldl \
   $(MYSQL_LIB) $(PERL_LIB)
This patch merely removes the -march=i686 to allow the compiler to dynamically set arch and in two makefiles it changes the mysql flags from hardcoded to dynamically generated.

If desired, I could create patches so the makefile will selectively add the -march=i686 for 32 bit machines.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:20 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3