From dd549a0a4d17ecef844e158421d714b8b4a9f141 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Thu, 22 May 2014 10:47:03 +0000 Subject: [PATCH] Arm64 port --- builds/posix/prefix.linux_arm64 | 27 ++++++++++++++++++++++++ configure.ac | 11 ++++++++++ src/common/classes/DbImplementation.cpp | 28 +++++++++++++------------ src/common/common.h | 4 ++++ src/jrd/inf_pub.h | 3 +++ 5 files changed, 60 insertions(+), 13 deletions(-) create mode 100644 builds/posix/prefix.linux_arm64 diff --git a/builds/posix/prefix.linux_arm64 b/builds/posix/prefix.linux_arm64 new file mode 100644 index 0000000000..a5a87550a3 --- /dev/null +++ b/builds/posix/prefix.linux_arm64 @@ -0,0 +1,27 @@ +# 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) +# 14 Apr 2008 Alan Barclay alan AT escribe.co.uk + + +#LD=@CXX@ + +#PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DLINUX -pipe -MMD -fPIC +#DEV_FLAGS=-ggdb -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Wall -Wno-switch + +PROD_FLAGS=-O3 -DLINUX -DARM64 -pipe -p -MMD -fPIC -fsigned-char -fmessage-length=0 +DEV_FLAGS=-ggdb -DLINUX -DARM64 -pipe -p -MMD -fPIC -Wall -fsigned-char -fmessage-length=0 -Wno-non-virtual-dtor diff --git a/configure.ac b/configure.ac index 0d9f3244e7..ac17c6742d 100644 --- a/configure.ac +++ b/configure.ac @@ -239,6 +239,17 @@ dnl CPU_TYPE=ppc64 STD_EDITLINE=true ;; + aarch64*-*-linux*) // port was not tested + MAKEFILE_PREFIX=linux_arm64 + INSTALL_PREFIX=linux + PLATFORM=LINUX + AC_DEFINE(LINUX, 1, [Define this if OS is Linux]) + EDITLINE_FLG=Y + SHRLIB_EXT=so + STD_EDITLINE=true + STD_ICU=true + ;; + sparc*-*-linux* | sparc*-*-gnu* | sparc*-*-k*bsd*-gnu) MAKEFILE_PREFIX=linux_sparc32 INSTALL_PREFIX=linux diff --git a/src/common/classes/DbImplementation.cpp b/src/common/classes/DbImplementation.cpp index d554ab2758..6152649684 100644 --- a/src/common/classes/DbImplementation.cpp +++ b/src/common/classes/DbImplementation.cpp @@ -46,6 +46,7 @@ static const UCHAR CpuSh = 11; static const UCHAR CpuSheb = 12; static const UCHAR CpuHppa = 13; static const UCHAR CpuAlpha = 14; +static const UCHAR CpuArm64 = 15; static const UCHAR OsWindows = 0; static const UCHAR OsLinux = 1; @@ -83,7 +84,8 @@ const char* hardware[] = { "SH", "SHEB", "HPPA", - "Alpha" + "Alpha", + "ARM64" }; const char* operatingSystem[] = { @@ -110,22 +112,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 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, 82, 83, -/* 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 +// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha ARM64 +/* Windows */ 50, 68, 0, 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, 82, 83, 84, +/* Darwin */ 70, 73, 0, 63, 77, 0, 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, 0, +/* HPUX */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, +/* AIX */ 0, 0, 0, 35, 0, 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, 0, +/* FreeBSD */ 61, 67, 0, 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, 0 }; const UCHAR backEndianess[FB_NELEM(hardware)] = { -// 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 +// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha ARM64 + 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0 }; } // anonymous namespace diff --git a/src/common/common.h b/src/common/common.h index 463f48b876..f545bfe3be 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -134,6 +134,10 @@ #define FB_CPU CpuArm #endif /* ARM */ +#ifdef ARM64 +#define FB_CPU CpuArm64 +#endif /* ARM64 */ + #ifdef sparc #define FB_CPU CpuUltraSparc #define RISC_ALIGNMENT diff --git a/src/jrd/inf_pub.h b/src/jrd/inf_pub.h index 56f6853ee4..7c52b335e4 100644 --- a/src/jrd/inf_pub.h +++ b/src/jrd/inf_pub.h @@ -215,6 +215,9 @@ enum info_db_implementations isc_info_db_impl_linux_sh = 80, isc_info_db_impl_linux_sheb = 81, + isc_info_db_impl_linux_hppa = 82, + isc_info_db_impl_linux_alpha = 83, + isc_info_db_impl_linux_arm64 = 84, isc_info_db_impl_last_value // Leave this LAST! };