make/aix/makefiles/xlc.make

Wed, 16 Jul 2014 11:40:00 -0700

author
katleman
date
Wed, 16 Jul 2014 11:40:00 -0700
changeset 6806
a7a22f7d9396
parent 0
f90c822e73f8
child 7515
b9c06f87e476
permissions
-rw-r--r--

Added tag jdk8u20-b23 for changeset f09d1f6a401e

     1 #
     2 # Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
     3 # Copyright (c) 2012, 2013 SAP. All rights reserved.
     4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5 #
     6 # This code is free software; you can redistribute it and/or modify it
     7 # under the terms of the GNU General Public License version 2 only, as
     8 # published by the Free Software Foundation.
     9 #
    10 # This code is distributed in the hope that it will be useful, but WITHOUT
    11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    12 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    13 # version 2 for more details (a copy is included in the LICENSE file that
    14 # accompanied this code).
    15 #
    16 # You should have received a copy of the GNU General Public License version
    17 # 2 along with this work; if not, write to the Free Software Foundation,
    18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    19 #
    20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    21 # or visit www.oracle.com if you need additional information or have any
    22 # questions.
    23 #  
    24 #
    26 #------------------------------------------------------------------------
    27 # CC, CXX & AS
    29 # Set compiler explicitly
    30 CXX = $(COMPILER_PATH)xlC_r
    31 CC  = $(COMPILER_PATH)xlc_r
    32 HOSTCXX = $(CXX)
    33 HOSTCC  = $(CC)
    35 AS  = $(CC) -c
    37 # get xlc version
    38 CXX_VERSION   := $(shell $(CXX) -qversion 2>&1 | sed -n 's/.*Version: \([0-9.]*\)/\1/p')
    40 # xlc 08.00.0000.0023 and higher supports -qtune=balanced
    41 CXX_SUPPORTS_BALANCED_TUNING=$(shell if [ $(subst .,,$(CXX_VERSION)) -ge 080000000023 ] ; then echo "true" ; fi)
    42 # xlc 10.01 is used with aggressive optimizations to boost performance
    43 CXX_IS_V10=$(shell if [ $(subst .,,$(CXX_VERSION)) -ge 100100000000 ] ; then echo "true" ; fi)
    45 # check for precompiled headers support
    47 # Switch off the precompiled header support. Neither xlC 8.0 nor xlC 10.0
    48 # support precompiled headers. Both "understand" the command line switches "-qusepcomp" and 
    49 # "-qgenpcomp" but when we specify them the following message is printed:
    50 # "1506-755 (W) The -qusepcomp option is not supported in this release."
    51 USE_PRECOMPILED_HEADER = 0
    52 ifneq ($(USE_PRECOMPILED_HEADER),0)
    53 PRECOMPILED_HEADER_DIR=.
    54 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp
    55 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
    56 endif
    59 #------------------------------------------------------------------------
    60 # Compiler flags
    62 # position-independent code
    63 PICFLAG = -qpic=large
    65 VM_PICFLAG/LIBJVM = $(PICFLAG)
    66 VM_PICFLAG/AOUT   =
    67 VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
    69 CFLAGS += $(VM_PICFLAG)
    70 CFLAGS += -qnortti
    71 CFLAGS += -qnoeh
    73 CFLAGS += -D_REENTRANT
    74 # no xlc counterpart for -fcheck-new
    75 # CFLAGS += -fcheck-new
    77 ARCHFLAG = -q64
    79 CFLAGS     += $(ARCHFLAG)
    80 AOUT_FLAGS += $(ARCHFLAG)
    81 LFLAGS     += $(ARCHFLAG)
    82 ASFLAGS    += $(ARCHFLAG)
    84 # Use C++ Interpreter
    85 ifdef CC_INTERP
    86   CFLAGS += -DCC_INTERP
    87 endif
    89 # Keep temporary files (.ii, .s)
    90 # no counterpart on xlc for -save-temps, -pipe
    92 # Compiler warnings are treated as errors
    93 # Do not treat warnings as errors
    94 # WARNINGS_ARE_ERRORS = -Werror
    95 # Except for a few acceptable ones
    96 # ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare
    97 # CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
    98 CFLAGS_WARN/COMMON = 
    99 CFLAGS_WARN/DEFAULT = $(CFLAGS_WARN/COMMON) $(EXTRA_WARNINGS)
   100 # Special cases
   101 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 
   103 # The flags to use for an optimized build
   104 OPT_CFLAGS += -O3
   106 # Hotspot uses very unstrict aliasing turn this optimization off
   107 OPT_CFLAGS += -qalias=noansi
   109 OPT_CFLAGS/NOOPT=-qnoopt
   111 DEPFLAGS = -qmakedep=gcc -MF $(DEP_DIR)/$(@:%=%.d)
   113 #------------------------------------------------------------------------
   114 # Linker flags
   116 # statically link libstdc++.so, work with gcc but ignored by g++
   117 STATIC_STDCXX = -Wl,-lC_r
   119 # Enable linker optimization
   120 # no counterpart on xlc for this 
   121 # LFLAGS += -Xlinker -O1
   123 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
   124 # MAPFLAG = -Xlinker --version-script=FILENAME
   126 # Build shared library
   127 SHARED_FLAG = -q64 -b64 -bexpall -G -bnoentry -qmkshrobj -brtl -bnolibpath
   129 #------------------------------------------------------------------------
   130 # Debug flags
   132 # Always compile with '-g' to get symbols in the stacktraces in the hs_err file
   133 DEBUG_CFLAGS += -g
   134 FASTDEBUG_CFLAGS += -g
   135 OPT_CFLAGS += -g
   137 # DEBUG_BINARIES overrides everything, use full -g debug information
   138 ifeq ($(DEBUG_BINARIES), true)
   139   DEBUG_CFLAGS = -g
   140   CFLAGS += $(DEBUG_CFLAGS)
   141 endif
   143 # If we are building HEADLESS, pass on to VM
   144 # so it can set the java.awt.headless property
   145 ifdef HEADLESS
   146 CFLAGS += -DHEADLESS
   147 endif
   149 # We are building Embedded for a small device
   150 # favor code space over speed
   151 ifdef MINIMIZE_RAM_USAGE
   152 CFLAGS += -DMINIMIZE_RAM_USAGE
   153 endif
   155 ifdef CROSS_COMPILE_ARCH
   156   STRIP = $(ALT_COMPILER_PATH)/strip
   157 else
   158   STRIP = strip
   159 endif

mercurial