8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:03:02 +01:00

Support 64bit Darwin PPC

This commit is contained in:
paulbeach 2008-06-09 12:02:59 +00:00
parent f0f3219e4d
commit d597247854
11 changed files with 104 additions and 13 deletions

View File

@ -0,0 +1,72 @@
# 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@
#$Id: prefix.darwin_ppc64,v 1.2 2008-06-09 12:01:43 paulbeach Exp $
# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
# To use this file to build 64bit version of Firebird for MacOS 10.4 (Tiger)
# Can only be built on MacOSX 10.5 (Leopard) due to lack of 64bit support in
# Carbon in previous versions of MacOSX
# 1. edit configure.in so that MAKEFILE_PREFIX=darwin_ppc64
# 2. uncomment the CPU_TYPE
# 3. edit extern/icu/source/config/mh-darwin and set the right 64bit flags (-arch ppc64)
# for CFLAGS, CXXFLAGS & LD_FLAGS
# 4. export CFLAGS='-arch _ppc64'
# 5. export CXXFLAGS='-arch ppc_64'
# 6. export LDFLAGS='-arch ppc_64'
# 7. export MACOSX_DEPLOYMENT_TARGET=10.4
DYLD_LIBRARY_PATH=$(FIREBIRD)/lib
export DYLD_LIBRARY_PATH
MACOSX_DEPLOYMENT_TARGET=10.4
export MACOSX_DEPLOYMENT_TARGET
OS_ServerFiles=inet_server.cpp
PROD_FLAGS=-O3 -DNDEBUG -DDARWIN -pipe -p -MMD -fPIC -fno-common -mmacosx-version-min=10.4
DEV_FLAGS=-ggdb -DDARWIN -pipe -p -MMD -fPIC -fno-common -Wall -mmacosx-version-min=10.4
CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden
EMBED_UTIL_TARGETS=gstat gds_drop gds_relay gsec nbackup fb_lock_print fbsvcmgr
CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_lock_print fbsvcmgr
Physical_IO_Module=os/posix/unix.cpp
PLATFORM_PATH=os/darwin
LINK_OPTS:=-arch ppc64
LD_FLAGS+=-arch ppc64
# -isysroot /Developer/SDKs/MacOSX10.4u.sdk
LIB_BUNDLE_OPTIONS:=$(LD_FLAGS) -bundle -flat_namespace -undefined suppress
LIB_LINK_OPTIONS:=$(LD_FLAGS) -dynamiclib -flat_namespace
LIB_LINK_SONAME:=-current_version 2.1.0 -compatibility_version 2.1.0 -seg1addr 0x30000000
LIB_LINK_MAPFILE:=-Wl,-exported_symbols_list,
LINK_FIREBIRD_EMBED_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.darwin.embed.vers
LINK_FIREBIRD_CLIENT_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.darwin.client.vers
LINK_FBINTL_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbintl.darwin.vers
LIB_LINK_RPATH:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Libraries/
LIB_EMBED_LINK_OPTIONS:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Firebird
LIB_CLIENT_LINK_OPTIONS:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Firebird
FBEMBED_LINK:=-F../gen/firebird -framework Firebird -L$(LIB) -lfbembed
PLATFORM_FALLBACK=os/posix
PLAT_CLASSIC_PRE_TARGET=darwin_setup_framework
PLAT_CLASSIC_POST_TARGET=darwin_finish_cs_framework
PLAT_SUPER_PRE_TARGET=darwin_setup_framework
PLAT_SUPER_POST_TRAGET=darwin_finish_ss_framework
PLATFORM_POSTBUILD_TARGET=darwin_postbuild_target

View File

@ -23,8 +23,10 @@
# 2. uncomment the CPU_TYPE
# 3. edit extern/icu/source/config/mh-darwin and set the right 64bit flags (-arch x86_64)
# for CFLAGS, CXXFLAGS & LD_FLAGS
# 4. export CFLAGS='-arch x86_64'
# 5. export CXXFLAGS='-arch x86_64'
# 4. export MACOSX_DEPLOYMENT_TARGET=10.5
# 5. export CFLAGS='-arch x86_64'
# 6. export CXXFLAGS='-arch x86_64'
# 7. export LDFLAGS='-arch x86_64'
DYLD_LIBRARY_PATH=$(FIREBIRD)/lib
export DYLD_LIBRARY_PATH

View File

@ -58,6 +58,7 @@ dnl CPU_TYPE=x86_64
powerpc-*-darwin*)
MAKEFILE_PREFIX=darwin_powerpc
dnl MAKEFILE_PREFIX=darwin_ppc64
MAKEFILE_POSTFIX=darwin
PLATFORM=DARWIN
INSTALL_PREFIX=darwin
@ -66,6 +67,7 @@ dnl CPU_TYPE=x86_64
EDITLINE_FLG=Y
SHRLIB_EXT=dylib
ICU_PLATFORM=MacOSX
dnl CPU_TYPE=ppc64
;;
amd64-*-freebsd*)

View File

@ -164,6 +164,7 @@
//#define BSD_UNIX
#define UNIX
#ifdef __ppc__
#define powerpc
#define IMPLEMENTATION isc_info_db_impl_darwin_ppc /* 63 */
#endif
#ifdef i386
@ -174,6 +175,10 @@
#define DARWIN64
#define IMPLEMENTATION isc_info_db_impl_darwin_x64 /* 73 */
#endif
#ifdef __ppc64__
#define DARWINPPC64
#define IMPLEMENTATION isc_info_db_impl_darwin_ppc64 /* 77 */
#endif
#define IEEE
#define QUADCONST(n) (n##LL)
#define QUADFORMAT "q"

View File

@ -206,7 +206,9 @@ enum info_db_implementations
isc_info_db_impl_linux_arm = 75,
isc_info_db_impl_linux_ia64 = 76,
isc_info_db_impl_last_value /* Leave this LAST! */
isc_info_db_impl_darwin_ppc64 = 77,
isc_info_db_impl_last_value // Leave this LAST!
};
#define isc_info_db_impl_isc_a isc_info_db_impl_isc_apl_68K

View File

@ -127,7 +127,7 @@
#if defined(i386) || defined(__x86_64__)
#define FB_PLATFORM "UI" /* Darwin/Intel */
#endif
#if defined(__ppc__)
#if defined(__ppc__) || defined(__ppc64__)
#define FB_PLATFORM "UP" /* Darwin/PowerPC */
#endif
#endif // DARWIN

View File

@ -158,9 +158,10 @@ static const int CLASS_DARWIN_X64 = 31; // Darwin/x64
static const int CLASS_SOLARIS_AMD64 = 32; // Solaris/amd64
static const int CLASS_LINUX_ARM = 33; // LINUX/ARM
static const int CLASS_LINUX_IA64 = 34; // LINUX/IA64
static const int CLASS_DARWIN_PPC64 = 35; // Darwin/PowerPC64
static const int CLASS_MAX10 = CLASS_LINUX_AMD64; // This should not be changed, no new ports with ODS10
static const int CLASS_MAX = CLASS_LINUX_IA64;
static const int CLASS_MAX = CLASS_DARWIN_PPC64;
// ARCHITECTURE COMPATIBILITY CLASSES
@ -252,7 +253,8 @@ static const ArchitectureType archMatrix[CLASS_MAX + 1] =
archLittleEndian, // CLASS_DARWIN_X64
archLittleEndian, // CLASS_SOLARIS_AMD64
archLittleEndian, // CLASS_LINUX_ARM
archLittleEndian // CLASS_LINUX_IA64
archLittleEndian, // CLASS_LINUX_IA64
archBigEndian // CLASS_DARWIN_PPC64
};
#ifdef sun
@ -330,8 +332,10 @@ const SSHORT CLASS = CLASS_NETBSD_I386;
const SSHORT CLASS = CLASS_DARWIN_I386;
#elif defined(DARWIN64)
const SSHORT CLASS = CLASS_DARWIN_X64;
#elif defined(__ppc__)
#elif defined(powerpc)
const SSHORT CLASS = CLASS_DARWIN_PPC;
#elif defined(DARWINPPC64)
const SSHORT CLASS = CLASS_DARWIN_PPC64;
#endif
#endif // DARWIN

View File

@ -215,7 +215,8 @@ static const TEXT* const impl_implementation[] = {
"Firebird/Darwin/Intel64", // 73
"Firebird/sun/amd64", // 74
"Firebird/linux ARM", // 75
"Firebird/linux IA64" // 76
"Firebird/linux IA64", /* 76 */
"Firebird/Darwin/PowerPC64" /* 77 */
};

View File

@ -153,8 +153,9 @@ typedef enum
arch_netbsd = 38,
arch_darwin_ppc = 39,
arch_winnt_64 = 40,
arch_darwin_64 = 41,
arch_max = 42 /* Keep this at the end */
arch_darwin_x64 = 41,
arch_darwin_ppc64 = 42,
arch_max = 43 /* Keep this at the end */
} P_ARCH;
/* Protocol Types */

View File

@ -45,7 +45,7 @@
#if defined(sun)
# ifdef sparc
const P_ARCH ARCHITECTURE = arch_sun4;
# elif defined(i386)
#elif (defined i386 || defined AMD64)
const P_ARCH ARCHITECTURE = arch_sunx86;
# else
const P_ARCH ARCHITECTURE = arch_sun;
@ -69,7 +69,9 @@ const P_ARCH ARCHITECTURE = arch_winnt_64;
#elif defined(I386)
const P_ARCH ARCHITECTURE = arch_intel_32;
#elif defined(DARWIN64)
const P_ARCH ARCHITECTURE = arch_darwin_64;
const P_ARCH ARCHITECTURE = arch_darwin_x64;
#elif defined(DARWINPPC64)
const P_ARCH ARCHITECTURE = arch_darwin_ppc64;
#endif

View File

@ -44,7 +44,7 @@
// ASF: Currently, all little-endian are SWAP_DOUBLE and big-endian aren't.
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) || defined(ARM) || defined(MIPSEL) || defined(DARWIN64) || defined(IA64)
#define SWAP_DOUBLE
#elif defined(sparc) || defined(PowerPC) || defined(PPC) || defined(__ppc__) || defined(HPUX) || defined(MIPS)
#elif defined(sparc) || defined(PowerPC) || defined(PPC) || defined(__ppc__) || defined(HPUX) || defined(MIPS) || defined(__ppc64__)
#undef SWAP_DOUBLE
#else
#error "Define SWAP_DOUBLE for your platform correctly !"