make/aix/makefiles/xlc.make

changeset 0
f90c822e73f8
child 7515
b9c06f87e476
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/make/aix/makefiles/xlc.make	Wed Apr 27 01:25:04 2016 +0800
     1.3 @@ -0,0 +1,159 @@
     1.4 +#
     1.5 +# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 +# Copyright (c) 2012, 2013 SAP. All rights reserved.
     1.7 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8 +#
     1.9 +# This code is free software; you can redistribute it and/or modify it
    1.10 +# under the terms of the GNU General Public License version 2 only, as
    1.11 +# published by the Free Software Foundation.
    1.12 +#
    1.13 +# This code is distributed in the hope that it will be useful, but WITHOUT
    1.14 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.15 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.16 +# version 2 for more details (a copy is included in the LICENSE file that
    1.17 +# accompanied this code).
    1.18 +#
    1.19 +# You should have received a copy of the GNU General Public License version
    1.20 +# 2 along with this work; if not, write to the Free Software Foundation,
    1.21 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.22 +#
    1.23 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.24 +# or visit www.oracle.com if you need additional information or have any
    1.25 +# questions.
    1.26 +#  
    1.27 +#
    1.28 +
    1.29 +#------------------------------------------------------------------------
    1.30 +# CC, CXX & AS
    1.31 +
    1.32 +# Set compiler explicitly
    1.33 +CXX = $(COMPILER_PATH)xlC_r
    1.34 +CC  = $(COMPILER_PATH)xlc_r
    1.35 +HOSTCXX = $(CXX)
    1.36 +HOSTCC  = $(CC)
    1.37 +
    1.38 +AS  = $(CC) -c
    1.39 +
    1.40 +# get xlc version
    1.41 +CXX_VERSION   := $(shell $(CXX) -qversion 2>&1 | sed -n 's/.*Version: \([0-9.]*\)/\1/p')
    1.42 +
    1.43 +# xlc 08.00.0000.0023 and higher supports -qtune=balanced
    1.44 +CXX_SUPPORTS_BALANCED_TUNING=$(shell if [ $(subst .,,$(CXX_VERSION)) -ge 080000000023 ] ; then echo "true" ; fi)
    1.45 +# xlc 10.01 is used with aggressive optimizations to boost performance
    1.46 +CXX_IS_V10=$(shell if [ $(subst .,,$(CXX_VERSION)) -ge 100100000000 ] ; then echo "true" ; fi)
    1.47 +
    1.48 +# check for precompiled headers support
    1.49 +
    1.50 +# Switch off the precompiled header support. Neither xlC 8.0 nor xlC 10.0
    1.51 +# support precompiled headers. Both "understand" the command line switches "-qusepcomp" and 
    1.52 +# "-qgenpcomp" but when we specify them the following message is printed:
    1.53 +# "1506-755 (W) The -qusepcomp option is not supported in this release."
    1.54 +USE_PRECOMPILED_HEADER = 0
    1.55 +ifneq ($(USE_PRECOMPILED_HEADER),0)
    1.56 +PRECOMPILED_HEADER_DIR=.
    1.57 +PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp
    1.58 +PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
    1.59 +endif
    1.60 +
    1.61 +
    1.62 +#------------------------------------------------------------------------
    1.63 +# Compiler flags
    1.64 +
    1.65 +# position-independent code
    1.66 +PICFLAG = -qpic=large
    1.67 +
    1.68 +VM_PICFLAG/LIBJVM = $(PICFLAG)
    1.69 +VM_PICFLAG/AOUT   =
    1.70 +VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
    1.71 +
    1.72 +CFLAGS += $(VM_PICFLAG)
    1.73 +CFLAGS += -qnortti
    1.74 +CFLAGS += -qnoeh
    1.75 +
    1.76 +CFLAGS += -D_REENTRANT
    1.77 +# no xlc counterpart for -fcheck-new
    1.78 +# CFLAGS += -fcheck-new
    1.79 +
    1.80 +ARCHFLAG = -q64
    1.81 +
    1.82 +CFLAGS     += $(ARCHFLAG)
    1.83 +AOUT_FLAGS += $(ARCHFLAG)
    1.84 +LFLAGS     += $(ARCHFLAG)
    1.85 +ASFLAGS    += $(ARCHFLAG)
    1.86 +
    1.87 +# Use C++ Interpreter
    1.88 +ifdef CC_INTERP
    1.89 +  CFLAGS += -DCC_INTERP
    1.90 +endif
    1.91 +
    1.92 +# Keep temporary files (.ii, .s)
    1.93 +# no counterpart on xlc for -save-temps, -pipe
    1.94 +
    1.95 +# Compiler warnings are treated as errors
    1.96 +# Do not treat warnings as errors
    1.97 +# WARNINGS_ARE_ERRORS = -Werror
    1.98 +# Except for a few acceptable ones
    1.99 +# ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare
   1.100 +# CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
   1.101 +CFLAGS_WARN/COMMON = 
   1.102 +CFLAGS_WARN/DEFAULT = $(CFLAGS_WARN/COMMON) $(EXTRA_WARNINGS)
   1.103 +# Special cases
   1.104 +CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 
   1.105 +
   1.106 +# The flags to use for an optimized build
   1.107 +OPT_CFLAGS += -O3
   1.108 +
   1.109 +# Hotspot uses very unstrict aliasing turn this optimization off
   1.110 +OPT_CFLAGS += -qalias=noansi
   1.111 +
   1.112 +OPT_CFLAGS/NOOPT=-qnoopt
   1.113 +
   1.114 +DEPFLAGS = -qmakedep=gcc -MF $(DEP_DIR)/$(@:%=%.d)
   1.115 +
   1.116 +#------------------------------------------------------------------------
   1.117 +# Linker flags
   1.118 +
   1.119 +# statically link libstdc++.so, work with gcc but ignored by g++
   1.120 +STATIC_STDCXX = -Wl,-lC_r
   1.121 +
   1.122 +# Enable linker optimization
   1.123 +# no counterpart on xlc for this 
   1.124 +# LFLAGS += -Xlinker -O1
   1.125 +
   1.126 +# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
   1.127 +# MAPFLAG = -Xlinker --version-script=FILENAME
   1.128 +
   1.129 +# Build shared library
   1.130 +SHARED_FLAG = -q64 -b64 -bexpall -G -bnoentry -qmkshrobj -brtl -bnolibpath
   1.131 +
   1.132 +#------------------------------------------------------------------------
   1.133 +# Debug flags
   1.134 +
   1.135 +# Always compile with '-g' to get symbols in the stacktraces in the hs_err file
   1.136 +DEBUG_CFLAGS += -g
   1.137 +FASTDEBUG_CFLAGS += -g
   1.138 +OPT_CFLAGS += -g
   1.139 +
   1.140 +# DEBUG_BINARIES overrides everything, use full -g debug information
   1.141 +ifeq ($(DEBUG_BINARIES), true)
   1.142 +  DEBUG_CFLAGS = -g
   1.143 +  CFLAGS += $(DEBUG_CFLAGS)
   1.144 +endif
   1.145 +
   1.146 +# If we are building HEADLESS, pass on to VM
   1.147 +# so it can set the java.awt.headless property
   1.148 +ifdef HEADLESS
   1.149 +CFLAGS += -DHEADLESS
   1.150 +endif
   1.151 +
   1.152 +# We are building Embedded for a small device
   1.153 +# favor code space over speed
   1.154 +ifdef MINIMIZE_RAM_USAGE
   1.155 +CFLAGS += -DMINIMIZE_RAM_USAGE
   1.156 +endif
   1.157 +
   1.158 +ifdef CROSS_COMPILE_ARCH
   1.159 +  STRIP = $(ALT_COMPILER_PATH)/strip
   1.160 +else
   1.161 +  STRIP = strip
   1.162 +endif

mercurial