mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:03:03 +01:00
AIX port - native compiler support
This commit is contained in:
parent
4930401f3e
commit
a37d818726
@ -112,6 +112,9 @@ STD_ICU=@STD_ICU@
|
||||
THR_FLAGS=@PTHREAD_CFLAGS@
|
||||
THR_LIBS=@PTHREAD_LIBS@
|
||||
|
||||
# thread local storage options - set by configure
|
||||
TLS_OPTIONS=@TLS_OPTIONS@
|
||||
|
||||
# Default programs and tools to be used in the build process
|
||||
|
||||
SH= sh -c
|
||||
@ -128,7 +131,7 @@ ECHO= echo
|
||||
QUIET_ECHO= @echo
|
||||
CD= cd
|
||||
CAT= cat
|
||||
AR= ar crsu
|
||||
AR= ar @AR_OPTIONS@ crsu
|
||||
LN= @LN_S@
|
||||
RANLIB= @RANLIB@
|
||||
BTYACC=$(ROOT)/extern/btyacc/btyacc
|
||||
|
@ -40,21 +40,63 @@
|
||||
#
|
||||
# export CC=cc_r
|
||||
# export CXX=xlC_r
|
||||
# export CFLAGS="-q64 -qtls=default"
|
||||
# export CXXFLAGS="-q64 -qtls=default"
|
||||
#
|
||||
|
||||
# Useful predefined macros from IBM XL C++
|
||||
# __IBMCPP__, indicates the level of the XL C++ compiler, e.g. 1010
|
||||
|
||||
# These macros are predefined by the compiler
|
||||
# xlC does not define _POWER or _AIX, which gcc does. xlC does define
|
||||
# __powerpc and __PPC, which Firebird code base doesn't check.
|
||||
# __BIG_ENDIAN__
|
||||
# __powerpc
|
||||
# __PPC
|
||||
# __unix
|
||||
|
||||
# qstaticinline, http://www-01.ibm.com/support/docview.wss?uid=swg21044588
|
||||
PROD_FLAGS=-O3 -qchars=signed -qstaticinline -qlanglvl=newexcp -DNDEBUG -D_AIX -D_POWER
|
||||
DEV_FLAGS=-O0 -qchars=signed -qstaticinline -qlanglvl=newexcp -D_AIX -D_POWER
|
||||
|
||||
# AIX ld option to set run-time library path is -Wl-blibpath:path1:path2
|
||||
# Additional -blibpath options are not additive! All paths must be provided as a colon separated list.
|
||||
# LIB_LINK_RPATH:=-Wl-blibpath:
|
||||
# LIB_PATH_OPTS = $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib:$(FirebirdInstallPrefix)/intl:/usr/lib:/lib
|
||||
LIB_PATH_OPTS= -Wl,-blibpath:$(FirebirdInstallPrefix)/lib:$(FirebirdInstallPrefix)/intl:/usr/local/lib:/usr/lib:/lib
|
||||
|
||||
# Flags shared by production and debug build
|
||||
# -qstaticinline, treat inline functions as static instead of extern
|
||||
# -qstaticinline removed, interferes with FB's placement new
|
||||
COMMON_FLAGS= -qchars=signed -qlanglvl=newexcp -qroconst \
|
||||
-D__IBM_ALLOW_OVERRIDE_PLACEMENT_NEW \
|
||||
$(TLS_OPTIONS)
|
||||
|
||||
# -qinfo=all:noppt:nopor:notrd:nouse, useful, but gives *so* many warnings!
|
||||
# -qextchk, ***AVOID***, causes "type mismatches for symbol" building gpre_static
|
||||
# -qcheck, generate code to perform *runtime* bounds, null-pointer, and div by zero checking
|
||||
# -qformat, warn of problems with string put and output format specifiers.
|
||||
# most qformat options tested useless to us, but zln (zero-length formats) and
|
||||
# exarg (excess arguments) are handy
|
||||
# -qinitauto, initialize uninitialized automatic vars to value for debugging
|
||||
# -qwarn64, warn about data conversion problems between 32-bit and 64-bit modes
|
||||
# -qstrict, ensure optimizations don't alter the semantics of the program
|
||||
PROD_FLAGS=$(COMMON_FLAGS) -O3 -qstaticinline -qstrict
|
||||
DEV_FLAGS=$(COMMON_FLAGS) -g -O0 \
|
||||
-qcheck -qformat=noall:exarg:zln
|
||||
|
||||
LINK_OPTS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) -Wl,-bbigtoc,-brtl
|
||||
LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(LIB_PATH_OPTS) -bM:SRE -bnoentry -Wl,-G,-bbigtoc,-bexpall
|
||||
|
||||
# AIX ld uses "export files" to manage symbol visibility. Export files are
|
||||
# functionally similar to "version files" on ELF systems and are specified
|
||||
# with the "-Wl,-bE:exportfile.exp" option.
|
||||
LINK_FIREBIRD_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.exp
|
||||
LINK_FIREBIRD_EMBED_SYMBOLS=$(LINK_FIREBIRD_SYMBOLS)
|
||||
LINK_FIREBIRD_CLIENT_SYMBOLS=$(LINK_FIREBIRD_SYMBOLS)
|
||||
LINK_TRACE_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbtrace.exp
|
||||
LINK_FBINTL_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbintl.exp
|
||||
LINK_IBUTIL_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/ib_util.exp
|
||||
LIB_LINK_MAPFILE=-Wl,-bE:
|
||||
|
||||
# These options aren't used by AIX (XCOFF) object files...
|
||||
LIB_LINK_RPATH=
|
||||
LIB_PATH_OPTS=
|
||||
LIB_LINK_SONAME=
|
||||
|
||||
OS_ServerFiles=inet_server.cpp
|
||||
|
||||
|
20
configure.in
20
configure.in
@ -47,6 +47,9 @@ RPM64=
|
||||
dnl Test for realtime library presence?
|
||||
RT_LIB_CHECK=false
|
||||
|
||||
dnl Test for special ar options?
|
||||
AR_OPT_CHECK=false
|
||||
|
||||
case "$target" in
|
||||
i686-*-darwin*)
|
||||
MAKEFILE_PREFIX=darwin_i386
|
||||
@ -79,7 +82,10 @@ dnl CPU_TYPE=ppc64
|
||||
dnl ibm xlC has many invocations, like xlC, xlc++, or xlc_r7
|
||||
comp=`echo "$CXX" | cut -c1-3 | dd conv=lcase 2>/dev/null`
|
||||
if test "$comp" = "xlc"; then
|
||||
AR_OPT_CHECK=true
|
||||
TLS_OPTIONS="-qtls=default"
|
||||
MAKEFILE_PREFIX=aix_powerpc_xlc
|
||||
ICU_PLATFORM=AIXPPCXLC
|
||||
else
|
||||
MAKEFILE_PREFIX=aix_powerpc
|
||||
fi
|
||||
@ -89,7 +95,6 @@ dnl ibm xlC has many invocations, like xlC, xlc++, or xlc_r7
|
||||
AC_DEFINE(AIX, 1, [Define this if OS is AIX])
|
||||
EDITLINE_FLG=N
|
||||
SHRLIB_EXT=so
|
||||
dnl ICU_PLATFORM=AIXPPCXLC
|
||||
;;
|
||||
|
||||
amd64-*-freebsd*)
|
||||
@ -304,6 +309,7 @@ fi
|
||||
AM_BINRELOC
|
||||
|
||||
AC_SUBST(MAKEFILE_PREFIX)
|
||||
AC_SUBST(AR_OPTIONS)
|
||||
AC_SUBST(PLATFORM)
|
||||
AC_SUBST(SHRLIB_EXT)
|
||||
AC_SUBST(ICU_PLATFORM)
|
||||
@ -493,6 +499,7 @@ AC_CHECK_HEADERS(sys/timeb.h)
|
||||
AC_CHECK_HEADERS(sys/param.h)
|
||||
AC_CHECK_HEADERS(sys/mount.h)
|
||||
AC_CHECK_HEADERS(sys/ioctl.h)
|
||||
AC_CHECK_HEADERS(sys/select.h)
|
||||
AC_CHECK_HEADERS(limits.h)
|
||||
AC_CHECK_HEADERS(setjmp.h)
|
||||
AC_CHECK_HEADERS(stdarg.h)
|
||||
@ -572,6 +579,13 @@ AC_COMPILE_IFELSE(
|
||||
void vafun(const char* fmt, ...) {va_list par, par2; va_start(par, fmt); va_copy(par2, par); va_end(par2); va_end(par);}]],
|
||||
[[return 0;]])],
|
||||
AC_DEFINE(HAVE_VA_COPY, 1, [Define this if va_copy() is defined in stdarg.h]))
|
||||
|
||||
if test "$AR_OPT_CHECK" = "true"; then
|
||||
dnl if 64-bit mode, then archive tool, ar, needs -X64 option
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(,[[int lp64 = __64BIT__; ]])],
|
||||
[AR_OPTIONS=-X64],)
|
||||
fi
|
||||
AC_LANG_POP(C++)
|
||||
|
||||
dnl Check for functions
|
||||
@ -836,9 +850,13 @@ case "$PLATFORM" in
|
||||
esac
|
||||
|
||||
dnl Detect support for ISO syntax for thread-locals
|
||||
pre_tls_cxxflags=$CXXFLAGS
|
||||
CXXFLAGS=$TLS_OPTIONS
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[__thread int a = 42;]],[[a = a + 1;]])],
|
||||
AC_DEFINE(HAVE___THREAD, 1, [Define it if compiler supports ISO syntax for thread-local storage]),)
|
||||
CXXFLAGS=$pre_tls_cxxflags
|
||||
AC_SUBST(TLS_OPTIONS)
|
||||
|
||||
dnl ##################### DO NOT ADD ANY TESTS BELOW ###########################
|
||||
|
||||
|
@ -49,7 +49,11 @@
|
||||
stdlib.h (EKU) */
|
||||
#endif
|
||||
|
||||
#if defined (_MSC_VER) || defined (__SUNPRO_CC)
|
||||
#ifdef __xlC__
|
||||
#include <new>
|
||||
#endif
|
||||
|
||||
#if defined (_MSC_VER) || defined (__SUNPRO_CC) || defined(__xlC__)
|
||||
#define THROW_BAD_ALLOC
|
||||
#else
|
||||
#define THROW_BAD_ALLOC throw (Firebird::BadAlloc)
|
||||
|
@ -3133,7 +3133,7 @@ dsc* evlUuidToChar(Jrd::thread_db* tdbb, const SysFunction* function, Jrd::jrd_n
|
||||
|
||||
|
||||
|
||||
#if defined (_MSC_VER) || defined (__SUNPRO_CC)
|
||||
#if defined (_MSC_VER) || defined (__SUNPRO_CC) || defined(__xlC__)
|
||||
typedef StdMathFunc VoidPtrStdMathFunc;
|
||||
#else
|
||||
typedef void* VoidPtrStdMathFunc;
|
||||
|
@ -88,6 +88,9 @@
|
||||
#include <netdb.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/wait.h>
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#endif // !WIN_NT
|
||||
|
||||
const int INET_RETRY_CALL = 5;
|
||||
|
Loading…
Reference in New Issue
Block a user