Port to Linux/Strong Arm 110. Only the pthreads version works.
authorwtc%netscape.com
Sun, 13 Sep 1998 03:43:33 +0000
changeset 238 8f0dd639c46afa7af853dd531712a8ce2abc65f1
parent 234 6db2ae39ed9d493a430a8d0d40de27052ab29618
child 239 c7a35360bd8cd5f93e94fd5c4370c224d11fd882
push idunknown
push userunknown
push dateunknown
Port to Linux/Strong Arm 110. Only the pthreads version works. Files changed: Linux.mk, _linux.cfg, _linux.h.
config/Linux.mk
pr/include/md/_linux.cfg
pr/include/md/_linux.h
--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -33,17 +33,21 @@ IMPL_STRATEGY = _PTH
 DEFINES			+= -D_REENTRANT
 else
 DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
 endif
 
 ifeq (86,$(findstring 86,$(OS_TEST)))
 CPU_ARCH		:= x86
 else
+ifeq (,$(filter-out sa110,$(OS_TEST)))
+CPU_ARCH		:= arm
+else
 CPU_ARCH		:= $(OS_TEST)
+endif
 CPU_ARCH_TAG		= _$(CPU_ARCH)
 endif
 
 CC			= gcc
 CCC			= g++
 RANLIB			= ranlib
 
 OS_INCLUDES		=
--- a/pr/include/md/_linux.cfg
+++ b/pr/include/md/_linux.cfg
@@ -294,16 +294,60 @@
 #define PR_ALIGN_OF_INT64   8
 #define PR_ALIGN_OF_FLOAT   4
 #define PR_ALIGN_OF_DOUBLE  8
 #define PR_ALIGN_OF_POINTER 4
 
 #define PR_BYTES_PER_WORD_LOG2   2
 #define PR_BYTES_PER_DWORD_LOG2  3
 
+#elif defined(__arm__)
+
+#define IS_LITTLE_ENDIAN 1
+#undef  IS_BIG_ENDIAN
+
+#define PR_BYTES_PER_BYTE   1
+#define PR_BYTES_PER_SHORT  2
+#define PR_BYTES_PER_INT    4
+#define PR_BYTES_PER_INT64  8
+#define PR_BYTES_PER_LONG   4
+#define PR_BYTES_PER_FLOAT  4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD   4
+#define PR_BYTES_PER_DWORD  8
+
+#define PR_BITS_PER_BYTE    8
+#define PR_BITS_PER_SHORT   16
+#define PR_BITS_PER_INT     32
+#define PR_BITS_PER_INT64   64
+#define PR_BITS_PER_LONG    32
+#define PR_BITS_PER_FLOAT   32
+#define PR_BITS_PER_DOUBLE  64
+#define PR_BITS_PER_WORD    32
+
+#define PR_BITS_PER_BYTE_LOG2   3
+#define PR_BITS_PER_SHORT_LOG2  4
+#define PR_BITS_PER_INT_LOG2    5
+#define PR_BITS_PER_INT64_LOG2  6
+#define PR_BITS_PER_LONG_LOG2   5
+#define PR_BITS_PER_FLOAT_LOG2  5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2   5
+
+#define PR_ALIGN_OF_SHORT   2
+#define PR_ALIGN_OF_INT     4
+#define PR_ALIGN_OF_LONG    4
+#define PR_ALIGN_OF_INT64   4
+#define PR_ALIGN_OF_FLOAT   4
+#define PR_ALIGN_OF_DOUBLE  4
+#define PR_ALIGN_OF_POINTER 4
+
+#define PR_BYTES_PER_WORD_LOG2   2
+#define PR_BYTES_PER_DWORD_LOG2  3
+
 #else
 
 #error "Unknown CPU architecture"
 
 #endif
 
 #define	HAVE_LONG_LONG
 /*
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -34,16 +34,18 @@
 #elif defined(__mc68000__)
 #define _PR_SI_ARCHITECTURE "m68k"
 #elif defined(__sparc__)
 #define _PR_SI_ARCHITECTURE "sparc"
 #elif defined(__i386__)
 #define _PR_SI_ARCHITECTURE "x86"
 #elif defined(__mips__)
 #define _PR_SI_ARCHITECTURE "mips"
+#elif defined(__arm__)
+#define _PR_SI_ARCHITECTURE "arm"
 #else
 #error "Unknown CPU architecture"
 #endif
 #define PR_DLL_SUFFIX		".so"
 
 #define _PR_VMBASE              0x30000000
 #define _PR_STACK_VMBASE	0x50000000
 #define _MD_DEFAULT_STACK_SIZE	65536L