From 14962fb831f115aa1ab0d05dbe0da8bd199378e2 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Mon, 9 Aug 2010 13:56:20 +0000 Subject: [PATCH] Damian's patch for additional CPUs under linux --- configure.in | 22 +++++++++++++++++++ src/common/classes/DbImplementation.cpp | 28 +++++++++++++------------ src/jrd/common.h | 10 +++++++++ 3 files changed, 47 insertions(+), 13 deletions(-) diff --git a/configure.in b/configure.in index 1f26b5f2e4..709f743015 100644 --- a/configure.in +++ b/configure.in @@ -275,6 +275,28 @@ dnl CPU_TYPE=ppc64 SHRLIB_EXT=so ;; + hppa*-*-linux*) + MAKEFILE_PREFIX=linux_generic + INSTALL_PREFIX=linux + PLATFORM=LINUX + AC_DEFINE(LINUX, 1, [Define this if OS is Linux]) + AC_DEFINE(HPPA, 1, [Define this if CPU is HPPA]) + LOCK_MANAGER_FLG=Y + EDITLINE_FLG=Y + SHRLIB_EXT=so + ;; + + alpha*-*-linux*) + MAKEFILE_PREFIX=linux_generic + INSTALL_PREFIX=linux + PLATFORM=LINUX + AC_DEFINE(LINUX, 1, [Define this if OS is Linux]) + AC_DEFINE(ALPHA, 1, [Define this if CPU is Alpha]) + LOCK_MANAGER_FLG=Y + EDITLINE_FLG=Y + SHRLIB_EXT=so + ;; + *-*-linux* | *-*-gnu*) MAKEFILE_PREFIX=linux_generic INSTALL_PREFIX=linux diff --git a/src/common/classes/DbImplementation.cpp b/src/common/classes/DbImplementation.cpp index 075d948725..a9e5c97795 100644 --- a/src/common/classes/DbImplementation.cpp +++ b/src/common/classes/DbImplementation.cpp @@ -46,6 +46,7 @@ static const UCHAR CpuS390x = 10; static const UCHAR CpuSh = 11; static const UCHAR CpuSheb = 12; static const UCHAR CpuHppa = 13; +static const UCHAR CpuAlpha = 14; static const UCHAR OsWindows = 0; static const UCHAR OsLinux = 1; @@ -82,7 +83,8 @@ const char* hardware[] = { "s390x", "SH", "SHEB", - "HPPA" + "HPPA", + "Alpha" }; const char* operatingSystem[] = { @@ -109,22 +111,22 @@ const char* compiler[] = { // This table lists pre-fb3 imlementation codes const UCHAR backwardTable[FB_NELEM(hardware) * FB_NELEM(operatingSystem)] = { -// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA -/* Windows */ 50, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* Linux */ 60, 66, 65, 69, 0, 71, 72, 75, 76, 79, 78, 80, 81, 0, -/* Darwin */ 70, 73, 0, 63, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* Solaris */ 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* HPUX */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, -/* AIX */ 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* MVS */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* FreeBSD */ 61, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* NetBSD */ 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha +/* Windows */ 50, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* Linux */ 60, 66, 65, 69, 0, 71, 72, 75, 76, 79, 78, 80, 81, 0, 0, +/* Darwin */ 70, 73, 0, 63, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* Solaris */ 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* HPUX */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, +/* AIX */ 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* MVS */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* FreeBSD */ 61, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* NetBSD */ 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; const UCHAR backEndianess[FB_NELEM(hardware)] = { -// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA - 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, +// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha + 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0 }; } // anonymous namespace diff --git a/src/jrd/common.h b/src/jrd/common.h index 666f460b56..723f5d15f0 100644 --- a/src/jrd/common.h +++ b/src/jrd/common.h @@ -182,6 +182,16 @@ #define RISC_ALIGNMENT #endif /* sheb */ +#ifdef HPPA +#define FB_CPU CpuHppa +#define RISC_ALIGNMENT +#endif /* hppa */ + +#ifdef ALPHA +#define FB_CPU CpuAlpha +#define RISC_ALIGNMENT +#endif + #endif /* LINUX */