Firebird News

Thursday, October 12, 2006

steps for porting on powerpc64

sudo apt-get install autoconf libtool g++-4.1 libreadline5-dev valgrind bison

checkout latest release version (almost stable)
cvs login
cvs -z3 co -r B2_0_Release firebird2

implementation error (ppc is not defined)
../src/jrd/inf.cpp: In function 'int INF_database_info(const SCHAR*, SSHORT, SCHAR*, SSHORT)':
../src/jrd/inf.cpp:406: error: 'IMPLEMENTATION' was not declared in this scope

patch the src/jrd/common.h

--- src/jrd/common.h 2004-12-01 07:49:10.076214624 -0800
+++ src/jrd/common.h_ppc 2004-12-01 07:46:23.809196816 -0800
@@ -129,6 +129,11 @@
#define IMPLEMENTATION isc_info_db_impl_linux_amd64 /* 66 next higher unique number, See you later */

+#ifdef PPC64
+#define IMPLEMENTATION isc_info_db_impl_linux_ppc64 /* 68 next higher unique number, See you later */
#ifdef i386
#define I386
#define IMPLEMENTATION isc_info_db_impl_i386 /* 60 next higher unique number, See you later */

in src/jrd/inf_pub.h search for isc_info_db_impl_freebsd_amd64 and add

isc_info_db_impl_freebsd_amd64 = 67,
isc_info_db_impl_linux_ppc64 = 68,

in src/jrd/pag.cpp search for CLASS_FREEBSD_AMD64

and add new class

static const int CLASS_LINUX_PPC64 = 26;// LINUX on PPC64

change CLASS_MAX to

static const int CLASS_MAX = CLASS_LINUX_PPC64

add ArchitectureType in archMatrix (in our case BigEndian)

archBigEndian // CLASS_LINUX_PPC64

Define the const SSHORT CLASS after the AMD64 one

#if defined LINUX && defined AMD64

in src/jrd/utl.cpp
search for "Firebird/FreeBSD/amd64", /* 67 */
and add
"Firebird/linux PPC64", /* 68 */

in src/remote/xdr.cpp search for
#elif defined(sparc) || defined(PowerPC)
and replace and add PPC64 define check

#elif defined(sparc) || defined(PowerPC) || defined(PPC64)

change in the
and add DEV_FLAGS=-DPPC64

it should look like this
DEV_FLAGS=-ggdb -DLINUX -pipe -MMD -p -fPIC -Wall -Wno-switch -DPPC64


No comments: