Compare commits

...

15 Commits

Author SHA1 Message Date
openeuler-ci-bot
5fd9969748
!51 [sync] PR-40: Add loongarch64 support
From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-08-21 03:06:17 +00:00
Wenlong Zhang
cced2d2073 fix build error for loongarch64
(cherry picked from commit c8dd9114678eebc301cd29b10fbda36854b3f619)
2023-08-21 10:05:05 +08:00
openeuler-ci-bot
583cc3d8a7
!39 [sync] PR-37: add -fPIE fix build error
From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-03-03 07:00:18 +00:00
dillon_chen
233da7bf7b add -fPIE fix build error
(cherry picked from commit 95c5a9347688235fa7a19162df6229d7aeb1fee6)
2023-03-03 09:24:27 +08:00
openeuler-ci-bot
094acf9027
!32 New version 3.0.10
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2022-09-23 04:00:04 +00:00
Funda Wang
7ad01f45d7 drop unused patch, sync with master 2022-09-22 12:49:00 +08:00
Funda Wang
4003aacf0a Merge branch 'master' into openEuler-22.03-LTS-Next 2022-09-22 12:39:58 +08:00
openeuler-ci-bot
aa2d581c54
!30 New version 3.0.10
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2022-09-08 09:51:39 +00:00
Funda Wang
6a9d3ab0ed New version 3.0.10 2022-09-01 13:37:01 +08:00
openeuler-ci-bot
2ce906ad7b
!29 Put correct source as /usr/sbin/fb_config
From: @dillon_chen 
Reviewed-by: @bzhaoop 
Signed-off-by: @bzhaoop
2022-08-30 08:43:06 +00:00
dillon_chen
2960396662 Put correct source as /usr/sbin/fb_config 2022-08-30 15:35:23 +08:00
openeuler-ci-bot
c082dead20
!23 [sync] PR-19: Fix failed to parse pid from pid file
From: @openeuler-sync-bot 
Reviewed-by: @bzhaoop 
Signed-off-by: @bzhaoop
2022-08-05 01:35:08 +00:00
starlet-dx
63645f08b5 Fix failed to parse pid from pid file
(cherry picked from commit 22e1e1540b5a738fc9955769f790ac9072b1f3e0)
2022-08-03 15:13:52 +08:00
openeuler-ci-bot
b9bf582d94 !15 Fix rpath security issue.
From: @bzhaoop
Reviewed-by: @zhengzhenyu
Signed-off-by: @zhengzhenyu
2021-09-14 03:30:35 +00:00
bzhaoop
b652c7b468 Fix rpath security issue.
Due to the libtool and firebird defaultly to enable rpath option during compiliation.
But that would raise some security issues relied on rpath.
So this commit will remove all the generated rpath record via chrpath.
2021-09-10 07:25:14 +00:00
10 changed files with 137 additions and 135 deletions

View File

@ -47,7 +47,7 @@ diff -urN Firebird-3.0.3.32900-0.old/configure.ac Firebird-3.0.3.32900-0/configu
+ libdir=/usr/lib64
+ ;;
+
powerpc64le-*-linux*)
powerpc64le-*-linux*)
MAKEFILE_PREFIX=linux_powerpc64el
INSTALL_PREFIX=linux
diff -urN Firebird-3.0.3.32900-0.old/src/common/classes/DbImplementation.cpp Firebird-3.0.3.32900-0/src/common/classes/DbImplementation.cpp

View File

@ -0,0 +1,112 @@
From 10745ac134b19ee035fc4b9836325b9b743d1890 Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Sat, 20 May 2023 02:26:48 +0000
Subject: [PATCH] add loongarch64 support for Firebird
---
builds/posix/prefix.linux_loongarch64 | 7 +++++++
configure.ac | 12 ++++++++++++
src/common/classes/DbImplementation.cpp | 7 ++++---
src/common/common.h | 4 ++++
src/jrd/inf_pub.h | 1 +
5 files changed, 28 insertions(+), 3 deletions(-)
create mode 100644 builds/posix/prefix.linux_loongarch64
diff --git a/builds/posix/prefix.linux_loongarch64 b/builds/posix/prefix.linux_loongarch64
new file mode 100644
index 0000000..70532a6
--- /dev/null
+++ b/builds/posix/prefix.linux_loongarch64
@@ -0,0 +1,7 @@
+WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -Wno-invalid-offsetof -Wno-narrowing -Wno-unused-local-typedefs
+
+PROD_FLAGS=-O3 -DLINUX -DRISCV64 -pipe -p -MMD -fPIC -fsigned-char -fmessage-length=0
+DEV_FLAGS=-ggdb -DLINUX -DRISCV64 -pipe -p -MMD -fPIC -Wall -fsigned-char -fmessage-length=0 $(WARN_FLAGS)
+
+CXXFLAGS := $(CXXFLAGS) -std=c++11
+
diff --git a/configure.ac b/configure.ac
index cdc9c3e..c6186fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -262,6 +262,18 @@ dnl CPU_TYPE=ppc64
STD_ICU=true
libdir=/usr/lib64
;;
+
+ loongarch64*-*-linux*)
+ MAKEFILE_PREFIX=linux_loongarch64
+ INSTALL_PREFIX=linux
+ PLATFORM=LINUX
+ AC_DEFINE(LINUX, 1, [Define this if OS is Linux])
+ EDITLINE_FLG=Y
+ SHRLIB_EXT=so
+ STD_EDITLINE=true
+ STD_ICU=true
+ libdir=/usr/lib64
+ ;;
powerpc64le-*-linux*)
MAKEFILE_PREFIX=linux_powerpc64el
diff --git a/src/common/classes/DbImplementation.cpp b/src/common/classes/DbImplementation.cpp
index 7376b9b..fb68145 100644
--- a/src/common/classes/DbImplementation.cpp
+++ b/src/common/classes/DbImplementation.cpp
@@ -91,7 +91,8 @@ const char* hardware[] = {
"ARM64",
"PowerPC64el",
"M68k",
- "RiscV64"
+ "RiscV64",
+ "LoongArch64"
};
const char* operatingSystem[] = {
@@ -118,7 +119,7 @@ const char* compiler[] = {
// This table lists pre-fb3 implementation codes
const UCHAR backwardTable[FB_NELEM(hardware) * FB_NELEM(operatingSystem)] =
{
-// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha ARM64 PowerPC64el RiscV64
+// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha ARM64 PowerPC64el RiscV64 LoongArch64
/* Windows */ 50, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* Linux */ 60, 66, 65, 69, 86, 71, 72, 75, 76, 79, 78, 80, 81, 82, 83, 84, 85, 88,
/* Darwin */ 70, 73, 0, 63, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -132,7 +133,7 @@ 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 M68k RiscV64
+// Intel AMD Sparc PPC PPC64 MIPSEL MIPS ARM IA64 s390 s390x SH SHEB HPPA Alpha ARM64 PowerPC64el M68k RiscV64 LoongArch64
0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0,
};
diff --git a/src/common/common.h b/src/common/common.h
index cf9fbe4..f7ead78 100644
--- a/src/common/common.h
+++ b/src/common/common.h
@@ -139,6 +139,10 @@
#define FB_CPU CpuRiscV64
#endif /* RISCV64 */
+#ifdef LOONGARCH64
+#define FB_CPU CpuLoongArch64
+#endif /* LOONGARCH64 */
+
#ifdef sparc
#define FB_CPU CpuUltraSparc
#define RISC_ALIGNMENT
diff --git a/src/jrd/inf_pub.h b/src/jrd/inf_pub.h
index 04a4061..7aa8693 100644
--- a/src/jrd/inf_pub.h
+++ b/src/jrd/inf_pub.h
@@ -248,6 +248,7 @@ enum info_db_implementations
isc_info_db_impl_linux_ppc64 = 86,
isc_info_db_impl_linux_m68k = 87,
isc_info_db_impl_linux_riscv64 = 88,
+ isc_info_db_impl_linux_loongarch64 = 89,
isc_info_db_impl_last_value // Leave this LAST!
};
--
2.33.0

Binary file not shown.

Binary file not shown.

View File

@ -1,63 +0,0 @@
From a4cb621bf55ef2101e22b1e7da5c458a1e0cc2ab Mon Sep 17 00:00:00 2001
From: AlexPeshkoff <alexander.peshkoff@gmail.com>
Date: Sat, 10 Feb 2018 19:43:26 +0300
Subject: [PATCH] Make it build with icu60
---
src/common/common.h | 3 +++
src/common/unicode_util.h | 4 ++++
src/intl/cs_icu.cpp | 1 -
src/intl/cv_icu.cpp | 1 -
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/common/common.h b/src/common/common.h
index 2cf877a804..58abaaf695 100644
--- a/src/common/common.h
+++ b/src/common/common.h
@@ -997,4 +997,7 @@ namespace Firebird {
static IMessageMetadata* const DELAYED_OUT_FORMAT = reinterpret_cast<IMessageMetadata*>(1);
}
+#undef UCHAR_TYPE
+#define UCHAR_TYPE uint16_t
+
#endif /* COMMON_COMMON_H */
diff --git a/src/common/unicode_util.h b/src/common/unicode_util.h
index 001d3d8283..03d48f9419 100644
--- a/src/common/unicode_util.h
+++ b/src/common/unicode_util.h
@@ -31,6 +31,10 @@
#include "../common/IntlUtil.h"
#include "../common/os/mod_loader.h"
#include "../common/classes/fb_string.h"
+
+#undef U_SHOW_CPLUSPLUS_API
+#define U_SHOW_CPLUSPLUS_API 0
+
#include <unicode/ucnv.h>
struct UCollator;
diff --git a/src/intl/cs_icu.cpp b/src/intl/cs_icu.cpp
index 76f15a2e68..bc3b48b44f 100644
--- a/src/intl/cs_icu.cpp
+++ b/src/intl/cs_icu.cpp
@@ -28,7 +28,6 @@
#include "../intl/ldcommon.h"
#include "cs_icu.h"
#include "cv_icu.h"
-#include <unicode/ucnv.h>
#include "../common/unicode_util.h"
diff --git a/src/intl/cv_icu.cpp b/src/intl/cv_icu.cpp
index b1ac01fce5..82262d9b4d 100644
--- a/src/intl/cv_icu.cpp
+++ b/src/intl/cv_icu.cpp
@@ -28,7 +28,6 @@
#include "../intl/ldcommon.h"
#include "ld_proto.h"
#include "cv_icu.h"
-#include <unicode/ucnv.h>
#include "../common/unicode_util.h"

View File

@ -6,8 +6,8 @@ Forwarded: no
+++ b/extern/cloop/Makefile
@@ -6,7 +6,7 @@ TARGET := release
CC := gcc
CXX := g++
CC := $(CC)
CXX := $(CXX)
-LD := $(CXX)
+LD := $(CXX) $(LDFLAGS)

View File

@ -1,11 +1,14 @@
%global ver 3.0.10
%global rev 33601
Name: firebird
Version: 3.0.3.32900
Release: 9
Version: %{ver}.%{rev}
Release: 3
Summary: SQL relational database management system
License: Interbase
URL: http://www.firebirdsql.org/
Source0: https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0.tar.bz2
Source0: https://github.com/FirebirdSQL/firebird/releases/download/v%{ver}/Firebird-%{ver}.%{rev}-0.tar.bz2
Source1: firebird-logrotate
Source2: firebird.conf
Source3: fb_config
@ -16,9 +19,8 @@ Patch0002: obsolete-syslogd.target.patch
Patch0003: honour-buildflags.patch
Patch0004: no-copy-from-icu.patch
Patch0005: cloop-honour-build-flags.patch
Patch0006: a4cb621bf55ef2101e22b1e7da5c458a1e0cc2ab.patch
Patch0007: 0001-Port-to-RISC-V-64-bit-riscv64.patch
Patch0008: fix-failed-to-parse-pid-from-pid-file.patch
Patch0008: 0001-add-loongarch64-support-for-Firebird.patch
BuildRequires: autoconf automake libtommath-devel libtool ncurses-devel libicu-devel
BuildRequires: libedit-devel gcc-c++ libstdc++-static systemd-units chrpath zlib-devel procmail
@ -65,7 +67,7 @@ Obsoletes: firebird-doc < %{version}-%{release}
Documentation for Firebird SQL server.
%prep
%autosetup -n Firebird-3.0.3.32900-0 -p1
%autosetup -n Firebird-%{ver}.%{rev}-0 -p1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
@ -95,7 +97,7 @@ cp -v gen/install/misc/*.pc ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig/
cd ${RPM_BUILD_ROOT}
rm -vf .%{_sbindir}/*.sh && mv -v .%{_sbindir}/fb_config .%{_libdir}/
install -pm 0755 %{SOURCE2} %{buildroot}%{_sbindir}/fb_config
install -pm 0755 %{SOURCE3} %{buildroot}%{_sbindir}/fb_config
rm -vf .%{_includedir}/firebird/perf.h .%{_includedir}/*.h .%{_libdir}/libicu*.so
chmod -R u+w .%{_docdir}/firebird
rm -vf .%{_datadir}/firebird/misc/{firebird.init.*,firebird.xinetd,rc.config.firebird}
@ -204,6 +206,18 @@ systemd-tmpfiles --create %{_tmpfilesdir}/firebird.conf
%exclude %{_docdir}/firebird/IPLicense.txt
%changelog
* Mon May 8 2023 Wenlong Zhang <zhangwenlong@loongson.cn> - 3.0.10.33601-3
- add loongarch64 support
* Thu Mar 2 2023 dillon chen <dillon.chen@gmail.com> - 3.0.10.33601-2
- add -fPIE in honour-buildflags.patch
* Thu Sep 1 2022 Funda Wang <fundawang@yeah.net> - 3.0.10.33601-1
- New version 3.0.10
* Tue Aug 30 2022 dillon chen<dillon.chen@gmail.com> - 3.0.3.32900-10
- put correct source as /usr/sbin/fb_config
* Mon Mar 7 2022 yaoxin <yaoxin30@huawei.com> - 3.0.3.32900-9
- Fix failed to parse pid from pid file

View File

@ -1,24 +0,0 @@
From 16b7c7ddb797a83863ec472f0db611c6c5777073 Mon Sep 17 00:00:00 2001
From: starlet-dx <15929766099@163.com>
Date: Mon, 7 Mar 2022 16:24:03 +0800
Subject: [PATCH 1/1] fix failed to parse pid from pid file
---
.../install/arch-specific/linux/firebird-superserver.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/builds/install/arch-specific/linux/firebird-superserver.service.in b/builds/install/arch-specific/linux/firebird-superserver.service.in
index fa9fbef..7501868 100644
--- a/builds/install/arch-specific/linux/firebird-superserver.service.in
+++ b/builds/install/arch-specific/linux/firebird-superserver.service.in
@@ -9,6 +9,7 @@ Group=firebird
Type=forking
PIDFile=/var/run/firebird/default.pid
ExecStart=@FB_SBINDIR@/fbguard -pidfile /var/run/firebird/default.pid -daemon -forever
+ExecStartPost=/usr/bin/sleep 0.1
StandardError=syslog
[Install]
--
2.30.0

View File

@ -13,7 +13,7 @@ Author: Damyan Ivanov <dmn@debian.org>
$(INCLUDE_DEST)/ibase.h: $(SRC_IBASE_ExtraFiles)
- $(STATICEXE_LINK) -o $(MAKE_HEADER_Bin) $(MAKE_HEADER_Src)
+ $(STATICEXE_LINK) $(EXE_LINK_OPTIONS) $(LINK_OPTS) $(CPPFLAGS) -o $(MAKE_HEADER_Bin) $(MAKE_HEADER_Src)
+ $(STATICEXE_LINK) $(EXE_LINK_OPTIONS) $(LINK_OPTS) $(CPPFLAGS) -o $(MAKE_HEADER_Bin) -fPIE $(MAKE_HEADER_Src)
$(CP) $^ .
$(MAKE_HEADER_Bin) <ibase.h >$@
$(RM) -f ibase.h

View File

@ -1,43 +1,6 @@
Description: Link isql with ICU instead of embedding part of it in the source
Author: Damyan Ivanov <dmn@debian.org>
--- a/src/isql/isql.epp
+++ b/src/isql/isql.epp
@@ -173,34 +173,6 @@ const char* UNKNOWN = "*unknown*";
namespace IcuUtil
{
- // Duplicate from ICU to not need to link ISQL with it. It's used by U8_NEXT_UNSAFE.
- static const uint8_t utf8_countTrailBytes[256] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 3, 3, 3, 3, 3,
- 3, 3, 3, /* illegal in Unicode */
- 4, 4, 4, 4, /* illegal in Unicode */
- 5, 5, /* illegal in Unicode */
- 0, 0 /* illegal bytes 0xfe and 0xff */
- };
-
// Return the number of characters of a string.
static unsigned charLength(SSHORT charset, unsigned len, const char* str)
{
--- a/builds/posix/Makefile.in
+++ b/builds/posix/Makefile.in
@@ -425,7 +425,8 @@ $(GSTAT): $(GSTAT_Objects) $(COMMON_LIB