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

Solaris 64bit AMD port

This commit is contained in:
paulbeach 2008-04-25 09:42:19 +00:00
parent 4591bde771
commit 64df8dd761
8 changed files with 103 additions and 9 deletions

View File

@ -0,0 +1,70 @@
# 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) Inprise Corporation.
#
# All Rights Reserved.
# Contributor(s): Paul Beach, Konstantin Kuznetsov, Neil McCalden
# This file can be used to build Firebird on Solaris 2.10 x86 64bit using gcc
#
# To build 64bit Firebird for Solaris
# export CFLAGS='-m64'
# export CXXFLAGS='-m64'
# export LDFLAGS='-m64'
# download ncurses-5.5 source code (there is a bug in the 64bit AMD
# implementation of the Solaris curses library which means we cannot use
# editline. tgetstr() returns a bad pointer)
# build ncurses
# ./configure --build=x86_64-pc-solaris2.10
# copy libncurses.a from the ncurses build to gen/firebird/lib
# make sure that make.defaults uses -lncurses instead of -lcurses for
# LINK_LIBS and STATICLINK_LIBS e.g. -lncurses -leditline
WARNINGS=-Wall -Wno-switch -Wno-parentheses -Wno-unused-variable
COMM_SOLX_FLAGS:=-DSOLARIS -DSOLARIS_MT -DBSD_COMP -DAMD64 -pipe -fmessage-length=0 -MMD -fPIC
SFIO=@SFIO_DIR@
SFIO_FLAGS=@SFIO_FLAGS@
SFIO_LDFLAGS=@SFIO_LDFLAGS@
ifdef SFIO
COMM_SOLX_FLAGS:= $(COMM_SOLX_FLAGS) $(SFIO_FLAGS) $(SFIO_LDFLAGS)
endif
COMM_SOLX_FLAGS:= $(COMM_SOLX_FLAGS)
PROD_FLAGS=-DNDEBUG -w $(COMM_SOLX_FLAGS) -O2
DEV_FLAGS=$(COMM_SOLX_FLAGS) -ggdb $(WARNINGS)
OS_ServerFiles=inet_server.cpp
GPRECOMMON_Files= ../jrd/ThreadData.cpp ../jrd/isc_sync.cpp
GPRECommon_Sources= $(GPRECOMMON_Files)
JRDBOOT_Extra_Files= isc_sync.cpp
GFIX_Other_Sources= jrd/isc_sync.cpp jrd/os/posix/isc_ipc.cpp
DROP_Other_Sources= jrd/ThreadData.cpp
LOCKPRINT_Other_Sources= jrd/ThreadData.cpp
Server_main_dummy = os/sun/server_main_dummy.cpp
LINK_OPTS+=-m64
LIB_LINK+=-m64
LIB_LINK_OPTIONS:=-m64 -fPIC -shared
LIB_LINK_RPATH:=-R
LIB_LINK_SONAME:=-h
LIB_LINK_MAPFILE=-Xlinker -M
EMBED_UTIL_TARGETS=gstat gds_drop gds_relay gsec nbackup fb_lock_print
CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_lock_print
Physical_IO_Module=os/posix/unix.cpp

View File

@ -219,6 +219,23 @@ dnl CPU_TYPE=x86_64
RT_LIB_CHECK=true
;;
x86_64-pc-solaris*)
MAKEFILE_PREFIX=solx86gcc_64
INSTALL_PREFIX=solaris
PLATFORM=solx86
AC_DEFINE(solx86, 1, [Define this if OS is Solarix x86])
AC_DEFINE(AMD64, 1, [Define this if CPU is amd64])
LOCK_MANAGER_FLG=N
EDITLINE_FLG=Y
SHRLIB_EXT=so
PTHREAD_CFLAGS=-threads
PTHREAD_LIBS=-lthread
ICU_PLATFORM=SOLARISX86GCC
service_thread_CS=true
libdir=/usr/lib/amd64
CPU_TYPE=amd64
RT_LIB_CHECK=true
;;
sparc-sun-solaris*)
MAKEFILE_PREFIX=solaris
INSTALL_PREFIX=solaris

View File

@ -299,16 +299,15 @@
#define IMPLEMENTATION isc_info_db_impl_isc_sun4 /* 30 */
#define RISC_ALIGNMENT
#else /* sparc */
#endif /* sparc */
#ifdef i386
#define I386
#define IMPLEMENTATION isc_info_db_impl_isc_sun_386i /* 32 */
#else /* i386 */
#define IMPLEMENTATION isc_info_db_impl_isc_sun_68k /* 28 */
#endif /* i386 */
#endif /* sparc */
#endif
#ifdef AMD64
#define IMPLEMENTATION isc_info_db_impl_sun_amd64 /* 74 */
#endif /* AMD64 */
#endif /* sun */

View File

@ -201,6 +201,7 @@ enum info_db_implementations
isc_info_db_impl_linux_mipsel = 71,
isc_info_db_impl_linux_mips = 72,
isc_info_db_impl_darwin_x64 = 73,
isc_info_db_impl_sun_amd64 = 74,
isc_info_db_impl_linux_arm = 75,

View File

@ -87,6 +87,9 @@
#ifdef i386
#define FB_PLATFORM "SI"
#endif /* i386 */
#ifdef AMD64
#define FB_PLATFORM "SI"
#endif
#ifndef FB_PLATFORM
#define FB_PLATFORM "S3"
#endif

View File

@ -256,9 +256,13 @@ static const ArchitectureType archMatrix[CLASS_MAX + 1] =
#ifdef sun
#ifdef i386
const SSHORT CLASS = CLASS_SOLARIS_I386;
#else
#endif
#ifdef sparc
const SSHORT CLASS = CLASS_SOLARIS_SPARC;
#endif
#ifdef AMD64
const SSHORT CLASS = CLASS_SOLARIS_AMD64;
#endif
#endif
#ifdef HPUX

View File

@ -121,7 +121,7 @@ typedef enum
arch_alliant = 6,
arch_msdos = 7,
arch_sun4 = 8,
arch_sun386 = 9,
arch_sunx86 = 9,
arch_hpux = 10,
arch_hpmpexl = 11,
arch_mac = 12,

View File

@ -46,7 +46,7 @@
# ifdef sparc
const P_ARCH ARCHITECTURE = arch_sun4;
# elif defined(i386)
const P_ARCH ARCHITECTURE = arch_sun386;
const P_ARCH ARCHITECTURE = arch_sunx86;
# else
const P_ARCH ARCHITECTURE = arch_sun;
# endif