8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 07:23:04 +01:00

Backported s390/s390x port

This commit is contained in:
alexpeshkoff 2009-10-08 08:20:42 +00:00
parent e8e0c7bf13
commit 3da2b323e5
6 changed files with 68 additions and 3 deletions

View File

@ -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 -pipe -MMD -fPIC -fmessage-length=0 -fsigned-char
OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer -fno-builtin
WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable
PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS)
DEV_FLAGS=-DUSE_VALGRIND -p $(COMMON_FLAGS) $(WARN_FLAGS)
#DEV_FLAGS=-p $(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

View File

@ -204,6 +204,15 @@ dnl CPU_TYPE=ppc64
PTHREAD_LIBS=-lpthread
;;
s390*-*-linux*)
MAKEFILE_PREFIX=linux_s390x
INSTALL_PREFIX=linux
PLATFORM=LINUX
AC_DEFINE(LINUX, 1, [Define this if OS is Linux])
EDITLINE_FLG=Y
SHRLIB_EXT=so
;;
*-*-linux*)
MAKEFILE_PREFIX=linux_generic
INSTALL_PREFIX=linux

View File

@ -151,6 +151,14 @@
#define RISC_ALIGNMENT
#endif // IA64
#ifdef __s390__
#ifdef __s390x__
#define IMPLEMENTATION isc_info_db_impl_linux_s390x // 78
#else
#define IMPLEMENTATION isc_info_db_impl_linux_s390 // 79
#endif // __s390x__
#endif // __s390__
#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))

View File

@ -207,6 +207,8 @@ enum info_db_implementations
isc_info_db_impl_linux_ia64 = 76,
isc_info_db_impl_darwin_ppc64 = 77,
isc_info_db_impl_linux_s390x = 78,
isc_info_db_impl_linux_s390 = 79,
isc_info_db_impl_last_value // Leave this LAST!
};

View File

@ -160,9 +160,11 @@ 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_DARWIN_PPC64 = 35; // Darwin/PowerPC64
static const int CLASS_LINUX_S390X = 36; // LINUX/s390x
static const int CLASS_LINUX_S390 = 37; // LINUX/s390
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_PPC64;
static const int CLASS_MAX = CLASS_LINUX_S390;
// ARCHITECTURE COMPATIBILITY CLASSES
@ -253,7 +255,9 @@ static ArchitectureType archMatrix[CLASS_MAX + 1] = {
archLittleEndian, // CLASS_SOLARIS_AMD64
archLittleEndian, // CLASS_LINUX_ARM
archLittleEndian, // CLASS_LINUX_IA64
archBigEndian // CLASS_DARWIN_PPC64
archBigEndian, // CLASS_DARWIN_PPC64
archBigEndian, // CLASS_LINUX_S390X
archBigEndian // CLASS_LINUX_S390
};
#ifdef sun
@ -311,6 +315,12 @@ const SSHORT CLASS = CLASS_LINUX_MIPSEL;
const SSHORT CLASS = CLASS_LINUX_MIPS;
#elif defined(IA64)
const SSHORT CLASS = CLASS_LINUX_IA64;
#elif defined(__s390__)
# if defined(__s390x__)
const SSHORT CLASS = CLASS_LINUX_S390X;
# else
const SSHORT CLASS = CLASS_LINUX_S390;
# endif // defined(__s390x__)
#else
#error no support on other hardware for Linux
#endif

View File

@ -244,7 +244,9 @@ static const TEXT* const impl_implementation[] = {
"Firebird/sun/amd64", /* 74 */
"Firebird/linux ARM", /* 75 */
"Firebird/linux IA64", /* 76 */
"Firebird/Darwin/PowerPC64" /* 77 */
"Firebird/Darwin/PowerPC64", /* 77 */
"Firebird/linux s390x", // 78
"Firebird/linux s390" // 79
};