diff --git a/builds/posix/prefix.linux_mipsel b/builds/posix/prefix.linux_mipsel new file mode 100644 index 0000000000..069ef2730a --- /dev/null +++ b/builds/posix/prefix.linux_mipsel @@ -0,0 +1,36 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Start of file prefix.linux: $(VERSION) $(PLATFORM) +#$Id: prefix.linux_mipsel,v 1.1 2007-04-01 10:04:28 alexpeshkoff Exp $ +# 2 Oct 2002, Nickolay Samofatov - Major cleanup + +LD=@CXX@ + +# -fno-builtin is used because GCC 3.0-3.2.2 had bug with builtins expansion +# you may remove it if engine is getting compiled with any other GCC version +PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DNDEBUG -DLINUX -pipe -MMD -fPIC +DEV_FLAGS=-ggdb -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Wall -Wno-switch + +OS_ServerFiles=inet_server.cpp + +LIB_LINK_OPTIONS:=-shared +LIB_LINK_RPATH:=-Wl,-rpath, +LIB_LINK_SONAME:=-Wl,-soname, +EMBED_UTIL_TARGETS=gstat gds_drop gds_relay gsec fb_lock_print +CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin fb_lock_print + +Physical_IO_Module=unix.cpp diff --git a/configure.in b/configure.in index 98d937932b..bb8773682f 100644 --- a/configure.in +++ b/configure.in @@ -79,6 +79,18 @@ case "$target" in SHRLIB_EXT=so ;; + mipsel-*-linux*) + MAKEFILE_PREFIX=linux_mipsel + INSTALL_PREFIX=linux + PLATFORM=LINUX + AC_DEFINE(LINUX) + LOCK_MANAGER_FLG=Y + EDITLINE_FLG=Y + SHRLIB_EXT=so + PTHREAD_CFLAGS=-pthread + PTHREAD_LIBS=-lpthread + ;; + x86_64*-*-linux*) MAKEFILE_PREFIX=linux_amd64 INSTALL_PREFIX=linux diff --git a/src/jrd/common.h b/src/jrd/common.h index 9445fc34c5..c43a3bf7a9 100644 --- a/src/jrd/common.h +++ b/src/jrd/common.h @@ -133,6 +133,10 @@ #define IMPLEMENTATION isc_info_db_impl_linux_sparc /* 65 */ #endif /* sparc */ +#ifdef MIPSEL +#define IMPLEMENTATION isc_info_db_impl_linux_mipsel /* 71 */ +#endif /* mipsel */ + #define MEMMOVE(from, to, length) memmove ((void *)to, (void *)from, (size_t) length) #define MOVE_FAST(from, to, length) memcpy (to, from, (int) (length)) #define MOVE_FASTER(from, to, length) memcpy (to, from, (int) (length)) diff --git a/src/jrd/inf_pub.h b/src/jrd/inf_pub.h index 31b683e562..a6c6993692 100644 --- a/src/jrd/inf_pub.h +++ b/src/jrd/inf_pub.h @@ -197,6 +197,7 @@ enum info_db_implementations isc_info_db_impl_linux_ppc = 69, isc_info_db_impl_darwin_x86 = 70, + isc_info_db_impl_linux_mipsel = 71, isc_info_db_impl_last_value /* Leave this LAST! */ }; diff --git a/src/jrd/pag.cpp b/src/jrd/pag.cpp index ea90c7687c..8c19ff3398 100644 --- a/src/jrd/pag.cpp +++ b/src/jrd/pag.cpp @@ -149,8 +149,9 @@ static const int CLASS_FREEBSD_AMD64 = 25;// FreeBSD/amd64 static const int CLASS_WINDOWS_AMD64 = 26;// Windows/amd64 static const int CLASS_LINUX_PPC = 27; // LINUX/PowerPC static const int CLASS_DARWIN_I386 = 28; //Darwin/Intel +static const int CLASS_LINUX_MIPSEL = 29; // LINUX/MIPS static const int CLASS_MAX10 = CLASS_LINUX_AMD64; // This should not be changed, no new ports with ODS10 -static const int CLASS_MAX = CLASS_DARWIN_I386; +static const int CLASS_MAX = CLASS_LINUX_MIPSEL; // ARCHITECTURE COMPATIBILITY CLASSES @@ -234,7 +235,8 @@ static ArchitectureType archMatrix[CLASS_MAX + 1] = { archLittleEndian, // CLASS_FREEBSD_AMD64 archLittleEndian, // CLASS_WINDOWS_AMD64 archBigEndian, // CLASS_LINUX_PPC - archLittleEndian // CLASS_DARWIN_I386 + archLittleEndian, // CLASS_DARWIN_I386 + archLittleEndian // CLASS_LINUX_MIPSEL }; #ifdef sun @@ -284,6 +286,8 @@ const SSHORT CLASS = CLASS_LINUX_SPARC; const SSHORT CLASS = CLASS_LINUX_AMD64; #elif defined(PPC) const SSHORT CLASS = CLASS_LINUX_PPC; +#elif defined(MIPSEL) +const SSHORT CLASS = CLASS_LINUX_MIPSEL; #else #error no support on other hardware for Linux #endif diff --git a/src/jrd/utl.cpp b/src/jrd/utl.cpp index 0dc970d956..66fa771cd9 100644 --- a/src/jrd/utl.cpp +++ b/src/jrd/utl.cpp @@ -238,6 +238,7 @@ static const TEXT* const impl_implementation[] = { "Firebird/x86-64/Windows NT", /* 68 */ "Firebird/linux PowerPC", /* 69 */ "Firebird/Darwin/Intel" /* 70 */ + "Firebird/linux MIPSEL" /* 71 */ }; diff --git a/src/remote/xdr.cpp b/src/remote/xdr.cpp index 65225b4cbf..1a7d62ce7d 100644 --- a/src/remote/xdr.cpp +++ b/src/remote/xdr.cpp @@ -39,7 +39,7 @@ // The simpliest way to check it is to issue // "select abs(2.0/3.0) from rdb$database" from correct client // It will return big strange value in case of invalid define -#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) +#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) || defined(MIPSEL) #define SWAP_DOUBLE #elif defined(sparc) || defined(PowerPC) #undef SWAP_DOUBLE