FreeBSD/Alpha port, contributed by Brian Ostrom <briano@netscape.com>.

Modified files: FreeBSD.mk, gencfg.c, _freebsd.cfg, _freebsd.h,
pr/tests/Makefile.
This commit is contained in:
wtc%netscape.com 1999-03-23 04:09:23 +00:00
parent ca2de5203e
commit 08520a5974
5 changed files with 69 additions and 2 deletions

View File

@ -25,8 +25,13 @@ CC = gcc
CCC = g++
RANLIB = ranlib
ifeq ($(OS_TEST),alpha)
CPU_ARCH = alpha
else
OS_REL_CFLAGS = -mno-486 -Di386
CPU_ARCH = x86
endif
CPU_ARCH_TAG = _$(CPU_ARCH)
OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
@ -34,6 +39,7 @@ ifeq ($(USE_PTHREADS),1)
IMPL_STRATEGY = _PTH
OS_LIBS = -lc_r
DEFINES += -D_THREAD_SAFE
OS_CFLAGS += -pthread
else
IMPL_STRATEGY = _EMU
OS_LIBS = -lc

View File

@ -43,8 +43,8 @@
#endif
#if defined(__alpha)
#if !(defined(_WIN32)) && !(defined(OSF1)) && !(defined(__linux))
error - None of OSF1, _WIN32, or __linux is defined
#if !(defined(_WIN32)) && !(defined(OSF1)) && !(defined(__linux)) && !(defined(__FreeBSD__))
error - None of OSF1, _WIN32, __linux, or __FreeBSD__ is defined
#endif
#endif

View File

@ -33,6 +33,8 @@
#undef HAVE_ALIGNED_DOUBLES
#undef HAVE_ALIGNED_LONGLONGS
#if defined(__i386__)
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
@ -71,6 +73,58 @@
#define PR_ALIGN_OF_DOUBLE 4
#define PR_ALIGN_OF_POINTER 4
#elif defined(__alpha)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
#define HAVE_LONG_LONG
#define HAVE_ALIGNED_DOUBLES
#define HAVE_ALIGNED_LONGLONGS
#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 8
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 8
#define PR_BYTES_PER_DWORD 8
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
#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 64
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 64
#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 6
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 6
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 8
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 8
#else
#error "Unknown CPU architecture"
#endif
#ifndef NO_NSPR_10_SUPPORT
#define BYTES_PER_BYTE PR_BYTES_PER_BYTE

View File

@ -25,7 +25,13 @@
#define PR_LINKER_ARCH "freebsd"
#define _PR_SI_SYSNAME "FREEBSD"
#if defined(__i386__)
#define _PR_SI_ARCHITECTURE "x86"
#elif defined(__alpha)
#define _PR_SI_ARCHITECTURE "alpha"
#else
#error "Unknown CPU architecture"
#endif
#if defined(__ELF__)
#define PR_DLL_SUFFIX ".so"
#else

View File

@ -362,6 +362,7 @@ endif
ifeq ($(OS_ARCH),FreeBSD)
ifeq ($(USE_PTHREADS),1)
LDOPTS += -pthread
EXTRA_LIBS = -lc_r
endif
LDOPTS += -Xlinker -R $(PWD)/$(DIST)/lib