From d5e481ba109136dafedf2d8d6345eeff11b6db2a Mon Sep 17 00:00:00 2001 From: asfernandes Date: Thu, 22 May 2008 15:02:59 +0000 Subject: [PATCH] Linux IA-64 port --- builds/posix/prefix.linux_ia64 | 34 ++++++++++++++++++++++++++++++++++ configure.in | 13 +++++++++++++ src/jrd/common.h | 5 +++++ src/jrd/inf_pub.h | 1 + src/jrd/pag.cpp | 8 ++++++-- src/jrd/utl.cpp | 3 ++- src/remote/xdr.cpp | 9 ++++++--- 7 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 builds/posix/prefix.linux_ia64 diff --git a/builds/posix/prefix.linux_ia64 b/builds/posix/prefix.linux_ia64 new file mode 100644 index 0000000000..a2d203ca13 --- /dev/null +++ b/builds/posix/prefix.linux_ia64 @@ -0,0 +1,34 @@ +# 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) +# +# 2 Oct 2002, Nickolay Samofatov - Major cleanup + +COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DIA64 -pipe -MMD -fPIC -fmessage-length=0 +OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer +WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable +CXXFLAGS:= $(CXXFLAGS) -fno-rtti + +PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS) +DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS) + +OS_ServerFiles=inet_server.cpp + +EMBED_UTIL_TARGETS=gstat gds_drop gsec nbackup fb_lock_print fbsvcmgr +CLIENT_UTIL_TARGETS=gds_drop gstat gsec fbguard fbmgr_bin nbackup fb_lock_print fbsvcmgr + +Physical_IO_Module=os/posix/unix.cpp diff --git a/configure.in b/configure.in index 811a021cb4..a89020a6ac 100644 --- a/configure.in +++ b/configure.in @@ -131,6 +131,19 @@ dnl CPU_TYPE=x86_64 RPM64='()(64bit)' ;; + ia64*-*-linux*) + MAKEFILE_PREFIX=linux_ia64 + INSTALL_PREFIX=linux + PLATFORM=LINUX + AC_DEFINE(LINUX, 1, [Define this if OS is Linux]) + LOCK_MANAGER_FLG=Y + EDITLINE_FLG=Y + SHRLIB_EXT=so + libdir=/usr/lib + CPU_TYPE=amd64 + RPM64='()(64bit)' + ;; + arm*-*-linux*) MAKEFILE_PREFIX=linux_arm INSTALL_PREFIX=linux diff --git a/src/jrd/common.h b/src/jrd/common.h index 863e2b4473..6053b4f669 100644 --- a/src/jrd/common.h +++ b/src/jrd/common.h @@ -134,6 +134,11 @@ #define IMPLEMENTATION isc_info_db_impl_linux_mips /* 72 */ #endif /* mips */ +#ifdef IA64 +#define IMPLEMENTATION isc_info_db_impl_linux_ia64 // 76 +#define RISC_ALIGNMENT +#endif // IA64 + #endif /* LINUX */ diff --git a/src/jrd/inf_pub.h b/src/jrd/inf_pub.h index 883f9b6f52..6c5a28f513 100644 --- a/src/jrd/inf_pub.h +++ b/src/jrd/inf_pub.h @@ -204,6 +204,7 @@ enum info_db_implementations isc_info_db_impl_sun_amd64 = 74, isc_info_db_impl_linux_arm = 75, + isc_info_db_impl_linux_ia64 = 76, isc_info_db_impl_last_value /* Leave this LAST! */ }; diff --git a/src/jrd/pag.cpp b/src/jrd/pag.cpp index 1ff7c7eba3..3e05b35bde 100644 --- a/src/jrd/pag.cpp +++ b/src/jrd/pag.cpp @@ -157,9 +157,10 @@ static const int CLASS_LINUX_MIPS = 30; // LINUX/MIPS static const int CLASS_DARWIN_X64 = 31; // Darwin/x64 static const int CLASS_SOLARIS_AMD64 = 32; // Solaris/amd64 static const int CLASS_LINUX_ARM = 33; // LINUX/ARM +static const int CLASS_LINUX_IA64 = 34; // LINUX/IA64 static const int CLASS_MAX10 = CLASS_LINUX_AMD64; // This should not be changed, no new ports with ODS10 -static const int CLASS_MAX = CLASS_LINUX_ARM; +static const int CLASS_MAX = CLASS_LINUX_IA64; // ARCHITECTURE COMPATIBILITY CLASSES @@ -250,7 +251,8 @@ static const ArchitectureType archMatrix[CLASS_MAX + 1] = archBigEndian, // CLASS_LINUX_MIPS archLittleEndian, // CLASS_DARWIN_X64 archLittleEndian, // CLASS_SOLARIS_AMD64 - archLittleEndian // CLASS_LINUX_ARM + archLittleEndian, // CLASS_LINUX_ARM + archLittleEndian // CLASS_LINUX_IA64 }; #ifdef sun @@ -302,6 +304,8 @@ const SSHORT CLASS = CLASS_LINUX_PPC; const SSHORT CLASS = CLASS_LINUX_MIPSEL; #elif defined(MIPS) const SSHORT CLASS = CLASS_LINUX_MIPS; +#elif defined(IA64) +const SSHORT CLASS = CLASS_LINUX_IA64; #else #error no support on other hardware for Linux #endif diff --git a/src/jrd/utl.cpp b/src/jrd/utl.cpp index c1fc12b8aa..edd852605e 100644 --- a/src/jrd/utl.cpp +++ b/src/jrd/utl.cpp @@ -214,7 +214,8 @@ static const TEXT* const impl_implementation[] = { "Firebird/linux MIPS", // 72 "Firebird/Darwin/Intel64", // 73 "Firebird/sun/amd64", // 74 - "Firebird/linux ARM" // 75 + "Firebird/linux ARM", // 75 + "Firebird/linux IA64" // 76 }; diff --git a/src/remote/xdr.cpp b/src/remote/xdr.cpp index 25d5ac166a..c23d74f8dd 100644 --- a/src/remote/xdr.cpp +++ b/src/remote/xdr.cpp @@ -35,10 +35,13 @@ // 30 Dec 2002. Nickolay Samofatov // This needs to be checked for all supported platforms -// The simpliest way to check it is to issue -// "select abs(2.0/3.0) from rdb$database" from correct client +// The simpliest way to check it is to issue from correct client: +// declare external function abs2 double precision +// returns double precision by value +// entry_point 'IB_UDF_abs' module_name 'ib_udf'; +// select abs2(2.0 / 3.0) from rdb$database; // It will return big strange value in case of invalid define -#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) || defined(ARM) || defined(MIPSEL) || defined(DARWIN64) +#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) || defined(ARM) || defined(MIPSEL) || defined(DARWIN64) || defined(IA64) #define SWAP_DOUBLE #elif defined(sparc) || defined(PowerPC) || defined(PPC) || defined(__ppc__) || defined(HPUX) || defined(MIPS) #undef SWAP_DOUBLE