Skip to content

Commit 2284632

Browse files
FlyGoatAlexPeshkoff
authored andcommitted
Add linux/mips64el support
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
1 parent d235284 commit 2284632

File tree

5 files changed

+57
-13
lines changed

5 files changed

+57
-13
lines changed

builds/posix/prefix.linux_mips64el

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# The contents of this file are subject to the Interbase Public
2+
# License Version 1.0 (the "License"); you may not use this file
3+
# except in compliance with the License. You may obtain a copy
4+
# of the License at http://www.Inprise.com/IPL.html
5+
#
6+
# Software distributed under the License is distributed on an
7+
# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
8+
# or implied. See the License for the specific language governing
9+
# rights and limitations under the License.
10+
#
11+
# The Original Code was created by Inprise Corporation
12+
# and its predecessors. Portions created by Inprise Corporation are
13+
# Copyright (C) Inprise Corporation.
14+
#
15+
# All Rights Reserved.
16+
# Contributor(s): ______________________________________.
17+
# Start of file prefix.linux: $(VERSION) $(PLATFORM)
18+
# 14 Apr 2008 Alan Barclay alan AT escribe.co.uk
19+
20+
21+
#LD=@CXX@
22+
23+
#PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DLINUX -pipe -MMD -fPIC
24+
#DEV_FLAGS=-ggdb -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Werror=delete-incomplete -Wall -Wno-switch
25+
26+
PROD_FLAGS=-O3 -DLINUX -DMIPS64EL -pipe -p -MMD -fPIC -fsigned-char -fmessage-length=0
27+
DEV_FLAGS=-ggdb -DLINUX -DMIPS64EL -pipe -p -MMD -fPIC -Werror=delete-incomplete -Wall -fsigned-char -fmessage-length=0 -Wno-non-virtual-dtor

configure.ac

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,15 @@ dnl CPU_TYPE=ppc64
230230
SHRLIB_EXT=so
231231
;;
232232

233+
mips64el-*-linux* | mips*64*el-*-linux*)
234+
MAKEFILE_PREFIX=linux_mips64el
235+
INSTALL_PREFIX=linux
236+
PLATFORM=LINUX
237+
AC_DEFINE(LINUX)
238+
EDITLINE_FLG=Y
239+
SHRLIB_EXT=so
240+
;;
241+
233242
x86_64*-*-linux* | x86_64*-*-gnu*)
234243
MAKEFILE_PREFIX=linux_amd64
235244
INSTALL_PREFIX=linux

src/common/classes/DbImplementation.cpp

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ static const UCHAR CpuArm64 = 15;
5050
static const UCHAR CpuPowerPc64el = 16;
5151
static const UCHAR CpuM68k = 17;
5252
static const UCHAR CpuRiscV64 = 18;
53+
static const UCHAR CpuMips64el = 19;
5354

5455
static const UCHAR OsWindows = 0;
5556
static const UCHAR OsLinux = 1;
@@ -91,7 +92,8 @@ const char* hardware[] = {
9192
"ARM64",
9293
"PowerPC64el",
9394
"M68k",
94-
"RiscV64"
95+
"RiscV64",
96+
"MIPS64EL"
9597
};
9698

9799
const char* operatingSystem[] = {
@@ -118,23 +120,23 @@ const char* compiler[] = {
118120
// This table lists pre-fb3 implementation codes
119121
const UCHAR backwardTable[FB_NELEM(hardware) * FB_NELEM(operatingSystem)] =
120122
{
121-
// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha ARM64 PPC64el M68k RiscV64
122-
/* Windows */ 50, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
123-
/* Linux */ 60, 66, 65, 69, 86, 71, 72, 75, 76, 79, 78, 80, 81, 82, 83, 84, 85, 87, 88,
124-
/* Darwin */ 70, 73, 0, 63, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
125-
/* Solaris */ 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
126-
/* HPUX */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
127-
/* AIX */ 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
128-
/* MVS */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
129-
/* FreeBSD */ 61, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0,
130-
/* NetBSD */ 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
123+
// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha ARM64 PPC64el M68k RiscV64 MIPS64EL
124+
/* Windows */ 50, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
125+
/* Linux */ 60, 66, 65, 69, 86, 71, 72, 75, 76, 79, 78, 80, 81, 82, 83, 84, 85, 87, 88, 90,
126+
/* Darwin */ 70, 73, 0, 63, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
127+
/* Solaris */ 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
128+
/* HPUX */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
129+
/* AIX */ 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
130+
/* MVS */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
131+
/* FreeBSD */ 61, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0,
132+
/* NetBSD */ 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
131133
};
132134

133135

134136
const UCHAR backEndianess[FB_NELEM(hardware)] =
135137
{
136-
// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha ARM64 PPC64el M68k RiscV64
137-
0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0,
138+
// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha ARM64 PPC64el M68k RiscV64 MIPS64EL
139+
0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0,
138140
};
139141

140142
} // anonymous namespace

src/common/common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@
156156
#define FB_CPU CpuMips
157157
#endif /* mips */
158158

159+
#ifdef MIPS64EL
160+
#define FB_CPU CpuMips64el
161+
#endif /* mips64el */
162+
159163
#ifdef IA64
160164
#define FB_CPU CpuIa64
161165
#define RISC_ALIGNMENT

src/include/firebird/impl/inf_pub.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ enum info_db_implementations
300300

301301
isc_info_db_impl_freebsd_ppc64el = 89,
302302

303+
isc_info_db_impl_linux_mips64el = 90,
304+
303305
isc_info_db_impl_last_value // Leave this LAST!
304306
};
305307

0 commit comments

Comments
 (0)