Solaris 64bit mode patch
Gene <[email protected]> Mon, 08 Dec 2003 00:01:09 -0800
| Newsgroups | gmane.comp.lib.state-threads.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------060804080407070508090809
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Attached is a Solaris 64-bit patch.
Changes are in "md.h", "Makefile", and "examples/Makefile".
There are two new build targets: "solaris-64-debug" and
"solaris-64-optimized".
Claus, please give it a try.
Thanks!
--------------060804080407070508090809
Content-Type: text/plain;
name="Sol64.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Sol64.patch"
--- st-1.4-orig/md.h 2002-10-25 19:34:58.000000000 -0700
+++ st-1.4/md.h 2003-12-07 21:39:15.000000000 -0800
@@ -521,6 +521,9 @@
#define MD_LONGJMP(env, val) longjmp(env, val)
#if defined(sparc) || defined(__sparc)
+#ifdef _LP64
+#define MD_STACK_PAD_SIZE 4095
+#endif
#define MD_INIT_CONTEXT(_thread, _sp, _main) \
ST_BEGIN_MACRO \
(void) MD_SETJMP((_thread)->context); \
--- st-1.4-orig/Makefile 2002-10-29 16:28:26.000000000 -0800
+++ st-1.4/Makefile 2003-12-07 22:28:27.000000000 -0800
@@ -51,6 +51,7 @@
#OS = OPENBSD
#OS = OSF1
#OS = SOLARIS
+#OS = SOLARIS_64
# Please see the "Other possible defines" section below for
# possible compilation options.
@@ -95,7 +96,8 @@
netbsd-debug netbsd-optimized \
openbsd-debug openbsd-optimized \
osf1-debug osf1-optimized \
- solaris-debug solaris-optimized
+ solaris-debug solaris-optimized \
+ solaris-64-debug solaris-64-optimized
#
# Platform specifics
@@ -192,13 +194,18 @@
LDFLAGS = -shared -all -expect_unresolved "*"
endif
-ifeq ($(OS), SOLARIS)
+ifeq (SOLARIS, $(findstring SOLARIS, $(OS)))
TARGETDIR = $(OS)_$(shell uname -r | sed 's/^5/2/')_$(BUILD)
CC = gcc
LD = gcc
RANLIB = true
LDFLAGS = -G
OTHER_FLAGS = -Wall
+ifeq ($(OS), SOLARIS_64)
+DEFINES = -DSOLARIS
+CFLAGS += -m64
+LDFLAGS += -m64
+endif
endif
#
@@ -410,6 +417,10 @@
$(MAKE) OS="SOLARIS" BUILD="DBG"
solaris-optimized:
$(MAKE) OS="SOLARIS" BUILD="OPT"
+solaris-64-debug:
+ $(MAKE) OS="SOLARIS_64" BUILD="DBG"
+solaris-64-optimized:
+ $(MAKE) OS="SOLARIS_64" BUILD="OPT"
##########################
--- st-1.4-orig/examples/Makefile 2002-02-18 20:26:38.000000000 -0800
+++ st-1.4/examples/Makefile 2003-12-07 22:37:26.000000000 -0800
@@ -42,6 +42,7 @@
# OPENBSD
# OSF1
# SOLARIS
+# SOLARIS_64
##########################
@@ -81,7 +82,7 @@
LIBRESOLV = -lresolv
endif
-ifeq ($(OS), SOLARIS)
+ifeq (SOLARIS, $(findstring SOLARIS, $(OS)))
LIBRESOLV = -lresolv
EXTRALIBS = -lsocket -lnsl
endif
--------------060804080407070508090809--
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click