Source: firebird3.0
Version: 3.0.1.32609.ds4-6
Severity: normal
Tags: patch
User: debian-...@lists.debian.org
Usertags: m68k

Hi Damyan!

The patch attached to this bug report adds platform support for m68k
which is one of the ports architectures we have in Debian.

This patch contains two patches which have been squashed into one patch
for convenience. Both patches have also been sent upstream and are
awaiting review [1]. The patches sent upstream also contain some
more explanation.

Since firebird-dev is a reverse dependency to Qt and therefore transitively
a large number of packages, it's very important for the m68k port to have
a working firebird3.0 package.

Thus, it would be very much appreciated if you could include the attached
patch in your next upload.

Thanks a lot,
Adrian

> [1] https://github.com/FirebirdSQL/firebird/pull/52

--
 .''`.  John Paul Adrian Glaubitz
 : :' :  Debian Developer - glaub...@debian.org
 `. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Description: Add platform support for Linux/m68k
Author: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de>

--- firebird3.0-3.0.1.32609.ds4.orig/configure.ac
+++ firebird3.0-3.0.1.32609.ds4/configure.ac
@@ -361,6 +361,17 @@ dnl CPU_TYPE=ppc64
    SHRLIB_EXT=so
    ;;
 
+  m68k*-*-linux*)
+   MAKEFILE_PREFIX=linux_generic
+   INSTALL_PREFIX=linux
+   PLATFORM=LINUX
+   AC_DEFINE(LINUX, 1, [Define this if OS is Linux])
+   AC_DEFINE(M68K, 1, [Define this if CPU is M68k])
+   LOCK_MANAGER_FLG=Y
+   EDITLINE_FLG=Y
+   SHRLIB_EXT=so
+   ;;
+
   *-*-linux* | *-*-gnu*)
     MAKEFILE_PREFIX=linux_generic
     INSTALL_PREFIX=linux
@@ -997,10 +1008,11 @@ AC_CHECK_MEMBER([struct dirent.d_type],
 dnl EKU: try to determine the alignment of long and double
 dnl      replaces FB_ALIGNMENT and FB_DOUBLE_ALIGN in src/jrd/common.h
 AC_MSG_CHECKING(alignment of long)
-AC_RUN_IFELSE([AC_LANG_SOURCE([[main () {
+AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <semaphore.h>
+main () {
   struct s {
     char a;
-    long long b;
+    union { long long x; sem_t y; } b;
   };
   exit((int)&((struct s*)0)->b);
 }]])],[ac_cv_c_alignment=$ac_status],[ac_cv_c_alignment=$ac_status],[])
--- firebird3.0-3.0.1.32609.ds4.orig/src/common/classes/DbImplementation.cpp
+++ firebird3.0-3.0.1.32609.ds4/src/common/classes/DbImplementation.cpp
@@ -48,6 +48,7 @@ static const UCHAR CpuHppa = 13;
 static const UCHAR CpuAlpha = 14;
 static const UCHAR CpuArm64 = 15;
 static const UCHAR CpuPowerPc64el = 16;
+static const UCHAR CpuM68k = 17;
 
 static const UCHAR OsWindows = 0;
 static const UCHAR OsLinux = 1;
@@ -87,7 +88,8 @@ const char* hardware[] = {
 	"HPPA",
 	"Alpha",
 	"ARM64",
-	"PowerPC64el"
+	"PowerPC64el",
+	"M68k"
 };
 
 const char* operatingSystem[] = {
@@ -128,8 +130,8 @@ const UCHAR backwardTable[FB_NELEM(hardw
 
 const UCHAR backEndianess[FB_NELEM(hardware)] =
 {
-//	Intel	AMD		Sparc	PPC		PPC64	MIPSEL	MIPS	ARM		IA64	s390	s390x	SH		SHEB	HPPA	Alpha	ARM64	PowerPC64el
-	0,		0,		1,		1,		1,		0,		1,		0,		0,		1,		1,		0,		1,		1,		0,		0,		0
+//	Intel	AMD		Sparc	PPC		PPC64	MIPSEL	MIPS	ARM		IA64	s390	s390x	SH		SHEB	HPPA	Alpha	ARM64	PowerPC64el	M68k
+       0,		0,		1,		1,		1,		0,		1,		0,		0,		1,		1,		0,		1,		1,		0,		0,		0,		1
 };
 
 } // anonymous namespace
--- firebird3.0-3.0.1.32609.ds4.orig/src/common/common.h
+++ firebird3.0-3.0.1.32609.ds4/src/common/common.h
@@ -195,6 +195,10 @@
 #define FB_CPU CpuPowerPc64
 #endif /* PPC64 */
 
+#ifdef M68K
+#define FB_CPU CpuM68k
+#endif /* M68K */
+
 #endif /* LINUX */
 
 
--- firebird3.0-3.0.1.32609.ds4.orig/src/jrd/inf_pub.h
+++ firebird3.0-3.0.1.32609.ds4/src/jrd/inf_pub.h
@@ -241,6 +241,7 @@ enum  info_db_implementations
 	isc_info_db_impl_linux_arm64 = 84,
 	isc_info_db_impl_linux_ppc64el = 85,
 	isc_info_db_impl_linux_ppc64 = 86,
+	isc_info_db_impl_linux_m68k = 87,
 
 
 	isc_info_db_impl_last_value   // Leave this LAST!

Reply via email to