summaryrefslogtreecommitdiffstats
path: root/external/firebird/macos-arm64.patch.0
blob: ab2596dbd98720d6dc8d48be042a247248cc7e2b (plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
-*- Mode: diff -*-
--- configure
+++ configure
@@ -2901,6 +2901,22 @@
     RAW_DEVICES_FLG=N
     ;;
 
+  aarch64-*-darwin*)
+    MAKEFILE_PREFIX=darwin_arm64
+    MAKEFILE_POSTFIX=darwin
+    PLATFORM=DARWIN
+    INSTALL_PREFIX=darwin
+
+$as_echo "#define DARWIN 1" >>confdefs.h
+
+	LIBS="$LIBS -framework CoreFoundation"
+    EDITLINE_FLG=Y
+    SHRLIB_EXT=dylib
+    CPU_TYPE=arm64
+    EXPORT_SYMBOLS_STYLE=darwin
+    RAW_DEVICES_FLG=N
+    ;;
+
   i*86-*-darwin*)
     MAKEFILE_PREFIX=darwin_i386
     MAKEFILE_POSTFIX=darwin
--- src/common/common.h
+++ src/common/common.h
@@ -234,6 +234,12 @@
 #define DARWINPPC64
 #define FB_CPU CpuPowerPc64
 #endif
+#ifdef __aarch64__
+// This means x86_64, but does it matter? There is no arch_arm64, arch_aarch64, arch_darwin_arm64,
+// or arch_darwin_aarch64 in the P_ARCH enum in src/remote/protocol.h.
+#define DARWIN64
+#define FB_CPU CpuArm64
+#endif
 #define IEEE
 #define QUADCONST(n) (n##LL)
 #define QUADFORMAT "q"
--- src/jrd/license.h
+++ src/jrd/license.h
@@ -128,6 +128,9 @@
 #if defined(ARM)
 #define FB_PLATFORM     "UA"
 #endif
+#if defined(__aarch64__)
+#define FB_PLATFORM     "UB"
+#endif
 #endif
 
 #ifdef DEV_BUILD
--- /dev/null
+++ builds/posix/prefix.darwin_arm64
@@ -0,0 +0,42 @@
+# 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.darwin:	$(VERSION)	@PLATFORM@
+# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
+#
+
+
+#DYLD_PRINT_ENV=1
+#export DYLD_PRINT_ENV
+
+#DYLD_PRINT_LIBRARIES=1
+#export DYLD_PRINT_LIBRARIES
+
+MACOSX_DEPLOYMENT_TARGET=11.0
+export MACOSX_DEPLOYMENT_TARGET
+
+PROD_FLAGS=-DDARWIN -pipe -O2 -MMD -fPIC -fno-common
+DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Wall -fno-optimize-sibling-calls -Wno-non-virtual-dtor
+CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden
+
+EXE_LINK_OPTIONS:= 
+UNDEF_PLATFORM=
+
+LINK_LIBS+=-liconv
+#MATHLIB=$(ROOT)/extern/libtommath/.libs/libtommath.a
+SO_LINK_LIBS+=-liconv
+
+include $(ROOT)/gen/darwin.defaults
--- src/isql/InputDevices.cpp
+++ src/isql/InputDevices.cpp
@@ -23,7 +23,7 @@
 
 #include "firebird.h"
 #if defined(DARWIN) && !defined(IOS)
-#if defined(i386) || defined(__x86_64__)
+#if defined(i386) || defined(__x86_64__) || defined(__arm64__)
 #include <architecture/i386/io.h>
 #else
 #include <io.h>