Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add platform support for Linux/m68k for the 3.0 branch #52

Merged
merged 3 commits into from
Oct 14, 2016
Merged
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
1 change: 1 addition & 0 deletions builds/posix/vers.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ platform_linux() {
echo "${TAB}$i;"
done

echo "${TAB}_IO_stdin_used;"
echo 'local:'
echo "${TAB}*;"
echo '};'
Expand Down
16 changes: 14 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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],[])
Expand Down
8 changes: 5 additions & 3 deletions src/common/classes/DbImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -87,7 +88,8 @@ const char* hardware[] = {
"HPPA",
"Alpha",
"ARM64",
"PowerPC64el"
"PowerPC64el",
"M68k"
};

const char* operatingSystem[] = {
Expand Down Expand Up @@ -128,8 +130,8 @@ const UCHAR backwardTable[FB_NELEM(hardware) * FB_NELEM(operatingSystem)] =

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
Expand Down
4 changes: 4 additions & 0 deletions src/common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@
#define FB_CPU CpuPowerPc64
#endif /* PPC64 */

#ifdef M68K
#define FB_CPU CpuM68k
#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 @@ -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!
Expand Down