Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,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
Expand Down Expand Up @@ -956,10 +967,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_TRY_RUN([main () {
AC_TRY_RUN([#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)
Expand Down
4 changes: 3 additions & 1 deletion src/jrd/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@
#define IMPLEMENTATION isc_info_db_impl_linux_ppc64el /* 85 */
#endif /* PPC64EL */


#ifdef M68K
#define IMPLEMENTATION isc_info_db_impl_linux_m68k /* 86 */
#endif /* M68K */

#endif /* LINUX */

Expand Down
1 change: 1 addition & 0 deletions src/jrd/inf_pub.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ enum info_db_implementations
isc_info_db_impl_linux_alpha = 83,
isc_info_db_impl_linux_arm64 = 84,
isc_info_db_impl_linux_ppc64el = 85,
isc_info_db_impl_linux_m68k = 86,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isc_info_db_impl_linux_m68k = 87

https://github.com/glaubitz/firebird/blob/eedb1ed9f0f01d146dca1c804e30590494de142a/src/jrd/inf_pub.h#L244

must add both
isc_info_db_impl_linux_ppc64 = 86,
isc_info_db_impl_linux_m68k = 87,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Mariuz!

This was for Firebird2.5 which did not have any support for ppc64 back then, but it was added to FB3.0.

I can backport the ppc64 changes to 2.5 if you want to and update this PR accordingly.

Adrian


isc_info_db_impl_last_value // Leave this LAST!
};
Expand Down
10 changes: 6 additions & 4 deletions src/jrd/pag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ 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_LINUX_PPC64EL = 43; // LINUX/PowerPc64EL

static const int CLASS_LINUX_M68K = 44; // LINUX/M68K

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_PPC64EL;
static const int CLASS_MAX = CLASS_LINUX_M68K;

// ARCHITECTURE COMPATIBILITY CLASSES

Expand Down Expand Up @@ -269,8 +269,8 @@ static const ArchitectureType archMatrix[CLASS_MAX + 1] =
archBigEndian, // CLASS_LINUX_HPPA
archLittleEndian, // CLASS_LINUX_ALPHA
archLittleEndian, // CLASS_LINUX_ARM64
archLittleEndian // CLASS_LINUX_PPC64EL

archLittleEndian, // CLASS_LINUX_PPC64EL
archBigEndian // CLASS_LINUX_M68K
};

#ifdef __sun
Expand Down Expand Up @@ -338,6 +338,8 @@ const SSHORT CLASS = CLASS_LINUX_ALPHA;
const SSHORT CLASS = CLASS_LINUX_ARM64;
#elif defined(PPC64EL)
const SSHORT CLASS = CLASS_LINUX_PPC64EL;
#elif defined(M68K)
const SSHORT CLASS = CLASS_LINUX_M68K;
#else
#error no support on other hardware for Linux
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/jrd/utl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ static const TEXT* const impl_implementation[] =
"Firebird/linux HPPA", // 82
"Firebird/linux ALPHA", // 83
"Firebird/linux ARM64", // 84
"Firebird/linux PPC64EL" // 85

"Firebird/linux PPC64EL", // 85
"Firebird/linux M68K" // 86
};


Expand Down