Another small solaris patch..

vincent at cojot.name vincent at cojot.name
Tue Dec 6 13:27:30 EST 2005


Would it be possible to add this patch to SVN?

The patch:
- also cleans code/tools and code/asm when 'make clean' is issued (all arches).
- Removes heavy optimization from 'release' builds on sparc until I get 
the crashes fixed. That'd make the default build 'work' out of the box for 
most people...
- Adds __sun and __sparc in a few places..

That would be great...

Thanks,


-- 
,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,
Vincent S. Cojot, Computer Engineering. STEP project. _.,-*~'`^`'~*-,._.,-*~
Ecole Polytechnique de Montreal, Comite Micro-Informatique. _.,-*~'`^`'~*-,.
Linux Xview/OpenLook resources page _.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'
http://step.polymtl.ca/~coyote  _.,-*~'`^`'~*-,._ coyote at NOSPAM4cojot.name

They cannot scare me with their empty spaces
Between stars - on stars where no human race is
I have it in me so much nearer home
To scare myself with my own desert places.       - Robert Frost

-------------- next part --------------
Index: code/unix/Makefile
===================================================================
--- code/unix/Makefile	(revision 431)
+++ code/unix/Makefile	(working copy)
@@ -524,7 +524,7 @@
   endif
 
 
-  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
+  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe
 
   ifeq ($(USE_SDL),1)
     BASE_CFLAGS += -DUSE_SDL_SOUND=1 $(shell sdl-config --cflags)
@@ -533,22 +533,23 @@
     GL_CFLAGS = -I/usr/openwin/include
   endif
 
-  OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer
+  OPTIMIZE = -O3 -ffast-math -funroll-loops
 
   ifeq ($(ARCH),sparc)
-    OPTIMIZE = -O3 -fomit-frame-pointer -ffast-math -falign-loops=2 \
+    OPTIMIZE = -O0 -ffast-math -falign-loops=2 \
       -falign-jumps=2 -falign-functions=2 -fstrength-reduce \
-      -funroll-loops
+      -mtune=ultrasparc -mv8plus -munaligned-doubles \
+      -funroll-loops
     BASE_CFLAGS += -DNO_VM_COMPILED
   else
   ifeq ($(ARCH),i386)
-    OPTIMIZE = -O3 -march=i686 -fomit-frame-pointer -ffast-math \
+    OPTIMIZE = -O3 -march=i686  -ffast-math \
       -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
       -funroll-loops -fstrength-reduce
   endif
   endif
 
-  DEBUG_CFLAGS = $(BASE_CFLAGS) -g -O0
+  DEBUG_CFLAGS = $(BASE_CFLAGS) -ggdb -O0
 
   RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
 
@@ -586,8 +587,8 @@
       $(B)/baseq3/vm/ui.qvm \
       $(B)/missionpack/vm/qagame.qvm \
       $(B)/missionpack/vm/cgame.qvm \
-      $(B)/missionpack/vm/ui.qvm
-#      $(B)/$(PLATFORM)quake3-smp
+      $(B)/missionpack/vm/ui.qvm \
+      $(B)/$(PLATFORM)quake3-smp
   else
     TARGETS=\
       $(B)/$(PLATFORM)quake3 \
@@ -603,8 +604,8 @@
       $(B)/baseq3/vm/ui.qvm \
       $(B)/missionpack/vm/qagame.qvm \
       $(B)/missionpack/vm/cgame.qvm \
-      $(B)/missionpack/vm/ui.qvm
-#      $(B)/$(PLATFORM)quake3-smp
+      $(B)/missionpack/vm/ui.qvm \
+      $(B)/$(PLATFORM)quake3-smp
 
   endif
 
@@ -1785,6 +1786,8 @@
 
 clean:clean-debug clean-release
 	$(MAKE) -C setup clean
+	$(MAKE) -C ../tools/lcc clean
+	$(MAKE) -C ../tools/asm clean
 
 clean2:
 	if [ -d $(B) ];then (find $(B) -name '*.d' -exec rm {} \;)fi
Index: code/client/qal.c
===================================================================
--- code/client/qal.c	(revision 431)
+++ code/client/qal.c	(working copy)
@@ -44,7 +44,7 @@
 #define SYMLOAD(x,y) GetProcAddress(x,y)
 #define OBJFREE(x) FreeLibrary(x)
 
-#elif defined __linux__ || defined __FreeBSD__ || defined MACOS_X
+#elif defined __linux__ || defined __FreeBSD__ || defined MACOS_X || defined __sun
 #include <dlfcn.h>
 #define OBJTYPE void *
 #define OBJLOAD(x) dlopen(x, RTLD_LAZY | RTLD_GLOBAL)
Index: code/client/cl_cin.c
===================================================================
--- code/client/cl_cin.c	(revision 431)
+++ code/client/cl_cin.c	(working copy)
@@ -643,7 +643,7 @@
 * Description:	
 *
 ******************************************************************************/
-#if defined(MACOS_X)
+#if defined(MACOS_X) || defined(__sparc)
 
 static ID_INLINE unsigned int yuv_to_rgb24( long y, long u, long v )
 { 


More information about the quake3 mailing list