8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00
firebird-mirror/builds/posix/prefix.aix_powerpc_xlc

125 lines
5.1 KiB
Plaintext
Raw Normal View History

# 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): Bill Oliver
#
## NOTE
## NOTE This file is work in progress, and Firebird 2.5 with xlC does not
## NOTE currently build!!! You should be using g++ when building on AIX!
## NOTE
#
# Compiler settings for AIX/powerpc, using IBM native compiler xlc.
# "xlC" is the C++ invocation for the xlc compiler.
#
# Tested with AIX 6.1.0.0. Requires AIX 5.1+
#
# From the xlc documentation... Firebird requires xlC_r invocation.
# All _r-suffixed invocations allow for threadsafe compilation and you
# can use them to link the programs that use multi-threading. Use these
# commands if you want to create threaded applications. The _r7 invocations
# are provided to help migrate programs based on Posix Draft 7 to Posix
# Draft 10. The _r4 invocations should be used for DCE threaded applications.
#
# Notes:
#
# 1) gcc is default compiler on AIX. To use xlC you must export these
# environment variables before running autogen.sh and make sure xlc is
# in your path.
#
# export CC=cc_r
# export CXX=xlC_r
2009-05-07 16:49:40 +02:00
# export CFLAGS="-q64 -qtls=default"
# export CXXFLAGS="-q64 -qtls=default"
#
2009-05-07 16:49:40 +02:00
# 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.
2009-05-07 16:49:40 +02:00
# __BIG_ENDIAN__
# __powerpc
# __PPC
# __unix
2009-05-08 12:41:02 +02:00
# AIX ld option to set run-time library path is -blibpath:path1:path2
# Additional -blibpath options are not additive! All paths must be provided as a colon separated list.
2009-05-08 12:41:02 +02:00
LIB_PATH_OPTS= -blibpath:$(FirebirdInstallPrefix)/lib:$(FirebirdInstallPrefix)/intl:/usr/local/lib:/usr/lib:/lib
ifeq ($(STD_ICU),true)
ICU_LIBS= -L/usr/local/lib -licuuc -licudata -licui18n
endif
# non-firebird libraries have .a extension
SHRLIB_FOREIGN_EXT=a
2009-05-07 16:49:40 +02:00
# Flags shared by production and debug build
# -qstaticinline, treat inline functions as static instead of extern
# -qstaticinline removed, interferes with FB's placement new
2009-05-08 12:41:02 +02:00
COMMON_FLAGS= -qchars=signed -qlanglvl=newexcp -qroconst -qpic \
2009-05-07 16:49:40 +02:00
-D__IBM_ALLOW_OVERRIDE_PLACEMENT_NEW \
2009-05-25 14:28:38 +02:00
-qsuppress=1540-1103 \
2009-05-07 16:49:40 +02:00
$(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
2009-05-19 08:48:42 +02:00
# -qstrict, ensure optimizations don't alter the semantics of the program.
# -O2 implies -qstrict, but -O3 and higher does not.
# -qmaxmem, limits the amount of memory that the compiler allocates while performing
# specific, memory-intensive optimizations. Only need when using -O | -O2.
# -O, same as -O2. 2009-05, tried -O3 unsuccessfully.
PROD_FLAGS=$(COMMON_FLAGS) -O -qstaticinline -qmaxmem=-1
DEV_FLAGS=$(COMMON_FLAGS) -g \
2009-05-07 16:49:40 +02:00
-qcheck -qformat=noall:exarg:zln
2009-05-08 12:41:02 +02:00
LINK_OPTS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) -brtl
# -G is shorthand to create shared objects with run-time linking. -G includes
# -berok, -brtl, -bnosymbolic, -bnortllib, -bnoautoexp, -bM:SRE
# -qmkshrobj, need this when creating a C++ shared object
LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(LIB_PATH_OPTS) -G -bnoentry -qmkshrobj
2009-05-07 16:49:40 +02:00
# AIX ld uses "export files" to manage symbol visibility. Export files are
# functionally similar to "version files" on ELF systems and are specified
2009-05-08 12:41:02 +02:00
# with the "-bE:exportfile.exp" option.
2009-05-07 16:49:40 +02:00
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
2009-05-08 12:41:02 +02:00
LIB_LINK_MAPFILE=-bE:
2009-05-07 16:49:40 +02:00
# These options aren't used by AIX (XCOFF) object files...
LIB_LINK_RPATH=
2009-05-07 16:49:40 +02:00
LIB_LINK_SONAME=
OS_ServerFiles=inet_server.cpp
EMBED_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr
CLIENT_UTIL_TARGETS=gstat gsec fbguard fbmgr_bin nbackup fb_lock_print fbsvcmgr
Physical_IO_Module=os/posix/unix.cpp
UNDEF_PLATFORM=