Hello,

I've enabled ARM64 build of firebird2.5 in ubuntu.

At the moment profiling was not available, hence -p / -pg flags were not used.

Build log can be found here:
https://launchpad.net/ubuntu/+source/firebird2.5/2.5.2.26540.ds4-8ubuntu1/+build/5278157

One can also compile it using qemu static:

#on trusty
$ mk-sbuild --arch arm64 trusty

Will create a functional arm64 chroot with arm64 user static.
Alternatively one can download arm64 chroots from cdimage.ubuntu.com,
drop arm64 static binary into it and chroot into it.

Please consider applying the attached patch.

I don't have access to arm64 machines and hence i have no idea if it
actually runs =) it does compile though.

Regards,

Dmitrijs.
Description: Add ARM64 platform support.
Author: Dmitrijs Ledkovs <x...@ubuntu.com>

--- /dev/null
+++ b/builds/posix/prefix.linux_arm64
@@ -0,0 +1,35 @@
+# 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 -DNDEBUG -DLINUX -pipe -MMD -fPIC
+#DEV_FLAGS=-ggdb -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Wall -Wno-switch
+
+PROD_FLAGS=-O3 -DNDEBUG -DLINUX -DARM64 -pipe -MMD -fPIC -fsigned-char -fmessage-length=0
+DEV_FLAGS=-ggdb -DLINUX -DARM64 -pipe -MMD -fPIC -Wall -fsigned-char -fmessage-length=0
+
+OS_ServerFiles=inet_server.cpp
+
+EMBED_UTIL_TARGETS=gstat gds_relay gsec nbackup fb_lock_print fbguard fbsvcmgr fbtracemgr
+CLIENT_UTIL_TARGETS=gstat gds_relay gsec nbackup fb_lock_print fbguard fbmgr_bin fbsvcmgr fbtracemgr
+
+Physical_IO_Module=unix.cpp
+
--- a/configure.in
+++ b/configure.in
@@ -214,6 +214,18 @@
     ATOMIC_LIBS=-latomic_ops
     ;;
 
+  aarch64*-*-linux*)
+    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
+    ATOMIC_LIBS=-latomic_ops
+    ;;
+
   sparc*-*-linux* | sparc*-*-gnu* | sparc*-*-k*bsd*-gnu)
     MAKEFILE_PREFIX=linux_sparc32
     INSTALL_PREFIX=linux
--- a/src/jrd/common.h
+++ b/src/jrd/common.h
@@ -192,6 +192,10 @@
 #define RISC_ALIGNMENT
 #endif /* alpha */
 
+#ifdef ARM64
+#define IMPLEMENTATION  isc_info_db_impl_linux_arm64	/* 84  */
+#endif /* ARM64 */
+
 #endif /* LINUX */
 
 
--- a/src/jrd/inf_pub.h
+++ b/src/jrd/inf_pub.h
@@ -215,6 +215,7 @@
 	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!
 };
--- a/src/jrd/pag.cpp
+++ b/src/jrd/pag.cpp
@@ -162,9 +162,10 @@
 static const int CLASS_LINUX_SHEB = 39;		// LINUX/SH (big-endian)
 static const int CLASS_LINUX_HPPA = 40;		// LINUX/HPPA
 static const int CLASS_LINUX_ALPHA = 41;	// LINUX/ALPHA
+static const int CLASS_LINUX_ARM64 = 42;	// LINUX/ARM64
 
 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_ALPHA;
+static const int CLASS_MAX = CLASS_LINUX_ARM64;
 
 // ARCHITECTURE COMPATIBILITY CLASSES
 
@@ -263,7 +264,8 @@
 	archLittleEndian, // CLASS_LINUX_SH
 	archBigEndian,    // CLASS_LINUX_SHEB
 	archBigEndian,    // CLASS_LINUX_HPPA
-	archLittleEndian  // CLASS_LINUX_ALPHA
+	archLittleEndian, // CLASS_LINUX_ALPHA
+	archLittleEndian, // CLASS_LINUX_ARM64
 };
 
 #ifdef __sun
@@ -327,6 +329,8 @@
 const SSHORT CLASS		= CLASS_LINUX_HPPA;
 #elif defined(ALPHA)
 const SSHORT CLASS		= CLASS_LINUX_ALPHA;
+#elif defined(ARM64)
+const SSHORT CLASS		= CLASS_LINUX_ARM64;
 #else
 #error no support on other hardware for Linux
 #endif
--- a/src/jrd/utl.cpp
+++ b/src/jrd/utl.cpp
@@ -227,7 +227,8 @@
 	"Firebird/linux SH",			// 80
 	"Firebird/linux SHEB",			// 81
 	"Firebird/linux HPPA",			// 82
-	"Firebird/linux ALPHA"			// 83
+	"Firebird/linux ALPHA",			// 83
+	"Firebird/linux ARM64",			// 84
 };
 
 
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to