make/aix/makefiles/xlc.make

Fri, 28 Aug 2020 07:38:21 +0100

author
andrew
date
Fri, 28 Aug 2020 07:38:21 +0100
changeset 9995
633a3d28d2fe
parent 7650
dfa21a177d66
permissions
-rw-r--r--

8251120: [8u] HotSpot build assumes ENABLE_JFR is set to either true or false
Summary: Only test for ENABLE_JFR being true, and assume undefined == false
Reviewed-by: neugens

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

mercurial