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