File: freebsd_ppc.patch

package info (click to toggle)
firebird3.0 3.0.13.ds7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 42,632 kB
  • sloc: ansic: 374,403; cpp: 319,973; sql: 14,691; pascal: 14,532; yacc: 7,557; fortran: 5,645; sh: 5,336; makefile: 1,041; perl: 194; sed: 83; awk: 76; xml: 19; csh: 15
file content (91 lines) | stat: -rw-r--r-- 3,281 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
commit a6ab775f97d7ae5b2a25b6dac93b79e5d24de633
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
Date:   Wed Dec 21 18:53:15 2022 +0100

    Add support for FreeBSD/powerpc

--- /dev/null
+++ b/builds/posix/prefix.freebsd_powerpc
@@ -0,0 +1,29 @@
+# The contents of this file are subject to the Interbase Public
+# License Version 1.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy
+# of the License at http://www.Inprise.com/IPL.html
+#
+# Software distributed under the License is distributed on an
+# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
+# or implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code was created by Inprise Corporation
+# and its predecessors. Portions created by Inprise Corporation are
+#
+# Copyright (C) 2000 Inprise Corporation
+# All Rights Reserved.
+# Contributor(s): ______________________________________.
+# Start of file prefix.freebsd_powerpc:	$(VERSION)	@PLATFORM@
+#
+# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
+
+EXE_LINK_OPTIONS := $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) -Wl,-rpath,../gen/firebird/lib
+
+COMMON_FLAGS=-DFREEBSD -DPPC -pipe -MMD -fPIC -fsigned-char
+PROD_FLAGS=$(COMMON_FLAGS) -O3 -g -fno-builtin -Wno-deprecated
+DEV_FLAGS=$(COMMON_FLAGS) -ggdb -p -Wall -Wno-non-virtual-dtor
+
+# These files are generated incorrectly (e.g. alice_meta.epp => alice_meta.cpp)
+%/alice_meta.o %/restore.o %/backup.o: COMMON_FLAGS += -Wno-narrowing
+%/OdsDetection.o %/dba.o: COMMON_FLAGS += -Wno-narrowing
--- a/configure.ac
+++ b/configure.ac
@@ -198,6 +198,16 @@ dnl CPU_TYPE=ppc64
     SHRLIB_EXT=so
     ;;
 
+  powerpc-*-freebsd*)
+    MAKEFILE_PREFIX=freebsd_powerpc
+    PLATFORM=FREEBSD
+    INSTALL_PREFIX=freebsd
+    AC_DEFINE(FREEBSD, 1, [Define this if OS is FreeBSD])
+    AC_DEFINE(PPC, 1, [Define this if CPU is ppc])
+    EDITLINE_FLG=Y
+    SHRLIB_EXT=so
+    ;;
+
   *-gentoo-freebsd*)
     MAKEFILE_PREFIX=freebsd
     PLATFORM=GENTOOFREEBSD
--- a/src/common/classes/DbImplementation.cpp
+++ b/src/common/classes/DbImplementation.cpp
@@ -128,7 +128,7 @@ const UCHAR backwardTable[FB_NELEM(hardw
 /* HPUX */		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		31,		0,		0,		0,		0,		0,		0,
 /* AIX */		0,		0,		0,		35,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,
 /* MVS */		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,
-/* FreeBSD */	61,		67,		0,		0,		91,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		89,		0,		0,		0,
+/* FreeBSD */	61,		67,		0,		92,		91,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		89,		0,		0,		0,
 /* NetBSD */	62,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0,		0
 };
 
--- a/src/common/common.h
+++ b/src/common/common.h
@@ -133,6 +133,10 @@
 #define FB_CPU CpuPowerPc64
 #endif
 
+#ifdef PPC
+#define FB_CPU CpuPowerPc
+#endif
+
 #ifdef i386
 #define I386
 #define FB_CPU CpuIntel
--- a/src/jrd/inf_pub.h
+++ b/src/jrd/inf_pub.h
@@ -254,6 +254,7 @@ enum  info_db_implementations
 	isc_info_db_impl_linux_mips64el = 90,
 
 	isc_info_db_impl_freebsd_ppc64 = 91,
+	isc_info_db_impl_freebsd_ppc = 92,
 
 	isc_info_db_impl_last_value   // Leave this LAST!
 };