hotspot/make/lib/CompileJvm.gmk
author jwilhelm
Thu, 06 Jul 2017 01:50:26 +0200
changeset 46630 75aa3e39d02c
parent 46560 388aa8d67c80
permissions -rw-r--r--
8182299: Enable disabled clang warnings, build on OSX 10 + Xcode 8 8182656: Make the required changes in GC code to build on OSX 10 + Xcode 8 8182657: Make the required changes in Runtime code to build on OSX 10 + Xcode 8 8182658: Make the required changes in Compiler code to build on OSX 10 + Xcode 8 Reviewed-by: jwilhelm, ehelin, phh Contributed-by: phh <hohensee@amazon.com>, jwilhelm <jesper.wilhelmsson@oracle.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     1
#
46560
388aa8d67c80 8181449: Fix debug.hpp / globalDefinitions.hpp dependency inversion
kbarrett
parents: 44411
diff changeset
     2
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     4
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    10
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    15
# accompanied this code).
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    16
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    20
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    23
# questions.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    24
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    25
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    26
# Include support files that will setup compiler flags due to the selected
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    27
# jvm feature set, and specific file overrides.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    28
include lib/JvmFeatures.gmk
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    29
include lib/JvmOverrideFiles.gmk
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    30
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    31
$(eval $(call IncludeCustomExtension, hotspot, lib/CompileJvm.gmk))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    32
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    33
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    34
# Setup compilation of the main Hotspot native library (libjvm).
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    35
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    36
JVM_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    37
JVM_MAPFILE := $(JVM_OUTPUTDIR)/mapfile
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    38
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    39
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    40
# Platform independent setup
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    41
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    42
# This variable may be added to by a custom extension
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    43
JVM_SRC_ROOTS += $(HOTSPOT_TOPDIR)/src
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    44
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    45
JVM_SRC_DIRS += $(call uniq, $(wildcard $(foreach d, $(JVM_SRC_ROOTS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    46
        $d/share/vm \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    47
        $d/os/$(HOTSPOT_TARGET_OS)/vm \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    48
        $d/os/$(HOTSPOT_TARGET_OS_TYPE)/vm \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    49
        $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/vm \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    50
        $d/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH)/vm \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    51
    ))) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    52
    $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    53
    $(JVM_VARIANT_OUTPUTDIR)/gensrc/tracefiles \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    54
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    55
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    56
JVM_CFLAGS_INCLUDES += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    57
    $(patsubst %,-I%,$(filter-out $(JVM_VARIANT_OUTPUTDIR)/gensrc/%, $(JVM_SRC_DIRS))) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    58
    -I$(JVM_VARIANT_OUTPUTDIR)/gensrc \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    59
    -I$(HOTSPOT_TOPDIR)/src/share/vm/precompiled \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    60
    -I$(HOTSPOT_TOPDIR)/src/share/vm/prims \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    61
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    62
40010
e32d5e545789 8161258: Simplify including platform files.
goetz
parents: 38097
diff changeset
    63
# INCLUDE_SUFFIX_* is only meant for including the proper
e32d5e545789 8161258: Simplify including platform files.
goetz
parents: 38097
diff changeset
    64
# platform files. Don't use it to guard code. Use the value of
e32d5e545789 8161258: Simplify including platform files.
goetz
parents: 38097
diff changeset
    65
# HOTSPOT_TARGET_CPU_DEFINE etc. instead.
43402
caa829a4272a 8004842: Unify values of boolean make variables set in configure to true/false
ihse
parents: 42664
diff changeset
    66
# Remaining TARGET_ARCH_* is needed to select the cpu specific
42664
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
    67
# sources for 64-bit ARM ports (arm versus aarch64).
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    68
JVM_CFLAGS_TARGET_DEFINES += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    69
    -DTARGET_ARCH_$(HOTSPOT_TARGET_CPU_ARCH) \
40010
e32d5e545789 8161258: Simplify including platform files.
goetz
parents: 38097
diff changeset
    70
    -DINCLUDE_SUFFIX_OS=_$(HOTSPOT_TARGET_OS) \
e32d5e545789 8161258: Simplify including platform files.
goetz
parents: 38097
diff changeset
    71
    -DINCLUDE_SUFFIX_CPU=_$(HOTSPOT_TARGET_CPU_ARCH) \
46560
388aa8d67c80 8181449: Fix debug.hpp / globalDefinitions.hpp dependency inversion
kbarrett
parents: 44411
diff changeset
    72
    -DINCLUDE_SUFFIX_COMPILER=_$(HOTSPOT_TOOLCHAIN_TYPE) \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    73
    -DTARGET_COMPILER_$(HOTSPOT_TOOLCHAIN_TYPE) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    74
    -D$(HOTSPOT_TARGET_CPU_DEFINE) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    75
    -DHOTSPOT_LIB_ARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    76
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    77
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    78
ifeq ($(DEBUG_LEVEL), release)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    79
  # For hotspot, release builds differ internally between "optimized" and "product"
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    80
  # in that "optimize" does not define PRODUCT.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    81
  ifneq ($(HOTSPOT_DEBUG_LEVEL), optimized)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    82
    JVM_CFLAGS_DEBUGLEVEL := -DPRODUCT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    83
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    84
else ifeq ($(DEBUG_LEVEL), fastdebug)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    85
  JVM_CFLAGS_DEBUGLEVEL := -DASSERT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    86
  ifeq ($(filter $(OPENJDK_TARGET_OS), windows aix), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    87
    # NOTE: Old build did not define CHECK_UNHANDLED_OOPS on Windows and AIX.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    88
    JVM_CFLAGS_DEBUGLEVEL += -DCHECK_UNHANDLED_OOPS
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    89
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    90
else ifeq ($(DEBUG_LEVEL), slowdebug)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    91
  # _NMT_NOINLINE_ informs NMT that no inlining is done by the compiler
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    92
  JVM_CFLAGS_DEBUGLEVEL := -DASSERT -D_NMT_NOINLINE_
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    93
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    94
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    95
JVM_CFLAGS += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    96
    $(JVM_CFLAGS_DEBUGLEVEL) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    97
    $(JVM_CFLAGS_TARGET_DEFINES) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    98
    $(JVM_CFLAGS_FEATURES) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    99
    $(JVM_CFLAGS_INCLUDES) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   100
    $(EXTRA_CFLAGS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   101
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   102
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   103
JVM_LDFLAGS += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   104
    $(SHARED_LIBRARY_FLAGS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   105
    $(JVM_LDFLAGS_FEATURES) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   106
    $(EXTRA_LDFLAGS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   107
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   108
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   109
JVM_LIBS += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   110
    $(JVM_LIBS_FEATURES) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   111
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   112
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   113
# These files and directories are always excluded
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   114
JVM_EXCLUDE_FILES += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp args.cc
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   115
JVM_EXCLUDES += adlc
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   116
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   117
# Needed by vm_version.cpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   118
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   119
  OPENJDK_TARGET_CPU_VM_VERSION := amd64
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   120
else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   121
  OPENJDK_TARGET_CPU_VM_VERSION := sparc
44411
8c642d0b237e 8177390: java -version does not differentiate between which port of AArch64 is used
neugens
parents: 43402
diff changeset
   122
else ifeq ($(HOTSPOT_TARGET_CPU_ARCH), arm)
8c642d0b237e 8177390: java -version does not differentiate between which port of AArch64 is used
neugens
parents: 43402
diff changeset
   123
  ifeq ($(OPENJDK_TARGET_CPU), aarch64)
8c642d0b237e 8177390: java -version does not differentiate between which port of AArch64 is used
neugens
parents: 43402
diff changeset
   124
    # This sets the Oracle Aarch64 port to use arm64
8c642d0b237e 8177390: java -version does not differentiate between which port of AArch64 is used
neugens
parents: 43402
diff changeset
   125
    # while the original Aarch64 port uses aarch64
8c642d0b237e 8177390: java -version does not differentiate between which port of AArch64 is used
neugens
parents: 43402
diff changeset
   126
    OPENJDK_TARGET_CPU_VM_VERSION := arm64
8c642d0b237e 8177390: java -version does not differentiate between which port of AArch64 is used
neugens
parents: 43402
diff changeset
   127
  endif
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   128
else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   129
  OPENJDK_TARGET_CPU_VM_VERSION := $(OPENJDK_TARGET_CPU)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   130
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   131
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   132
CFLAGS_VM_VERSION := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   133
    $(VERSION_CFLAGS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   134
    -DHOTSPOT_VERSION_STRING='"$(VERSION_STRING)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   135
    -DDEBUG_LEVEL='"$(DEBUG_LEVEL)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   136
    -DHOTSPOT_BUILD_USER='"$(USERNAME)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   137
    -DHOTSPOT_VM_DISTRO='"$(HOTSPOT_VM_DISTRO)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   138
    -DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   139
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   140
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   141
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
43402
caa829a4272a 8004842: Unify values of boolean make variables set in configure to true/false
ihse
parents: 42664
diff changeset
   142
ifeq ($(USE_PRECOMPILED_HEADER), false)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   143
  JVM_CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   144
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   145
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   146
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   147
# Platform specific setup
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   148
42664
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   149
# ARM source selection
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   150
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   151
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), linux-arm)
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   152
  JVM_EXCLUDE_PATTERNS += arm_64
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   153
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   154
else ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), linux-aarch64)
43402
caa829a4272a 8004842: Unify values of boolean make variables set in configure to true/false
ihse
parents: 42664
diff changeset
   155
  # For 64-bit arm builds, we use the 64 bit hotspot/src/cpu/arm
42664
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   156
  # hotspot sources if HOTSPOT_TARGET_CPU_ARCH is set to arm.
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   157
  # Exclude the aarch64 and 32 bit arm files for this build.
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   158
  ifeq ($(HOTSPOT_TARGET_CPU_ARCH), arm)
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   159
    JVM_EXCLUDE_PATTERNS += arm_32 aarch64
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   160
  endif
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   161
endif
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 41692
diff changeset
   162
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   163
ifneq ($(filter $(OPENJDK_TARGET_OS), linux macosx windows), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   164
  JVM_PRECOMPILED_HEADER := $(HOTSPOT_TOPDIR)/src/share/vm/precompiled/precompiled.hpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   165
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   166
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   167
ifeq ($(OPENJDK_TARGET_CPU), x86)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   168
  JVM_EXCLUDE_PATTERNS += x86_64
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   169
else ifeq ($(OPENJDK_TARGET_CPU), x86_64)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   170
  JVM_EXCLUDE_PATTERNS += x86_32
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   171
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   172
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   173
# Inline assembly for solaris
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   174
ifeq ($(OPENJDK_TARGET_OS), solaris)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   175
  ifeq ($(OPENJDK_TARGET_CPU), x86_64)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   176
    JVM_CFLAGS += $(HOTSPOT_TOPDIR)/src/os_cpu/solaris_x86/vm/solaris_x86_64.il
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   177
  else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   178
    JVM_CFLAGS += $(HOTSPOT_TOPDIR)/src/os_cpu/solaris_sparc/vm/solaris_sparc.il
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   179
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   180
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   181
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   182
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-sparcv9)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   183
  ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), false)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   184
    # NOTE: In the old build, we weirdly enough set -g/-g0 always, regardless
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   185
    # of if debug symbols were needed. Without it, compilation fails on
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   186
    # sparc! :-(
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   187
    JVM_CFLAGS += -g0
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   188
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   189
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   190
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   191
ifeq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   192
  ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   193
    RC_DESC := 64-Bit$(SPACE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   194
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   195
  JVM_RCFLAGS += -D"HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(RC_DESC)$(JVM_VARIANT) VM"
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   196
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   197
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   198
JVM_OPTIMIZATION ?= HIGHEST_JVM
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   199
41674
8ff2f216109b 8164120: The minimal VM should be stripped using --strip-unneeded
erikj
parents: 40010
diff changeset
   200
# Need to set JVM_STRIPFLAGS to the default value from SPEC since the STRIPFLAGS
8ff2f216109b 8164120: The minimal VM should be stripped using --strip-unneeded
erikj
parents: 40010
diff changeset
   201
# parameter to SetupNativeCompilation allows an empty value to override the
8ff2f216109b 8164120: The minimal VM should be stripped using --strip-unneeded
erikj
parents: 40010
diff changeset
   202
# default.
8ff2f216109b 8164120: The minimal VM should be stripped using --strip-unneeded
erikj
parents: 40010
diff changeset
   203
JVM_STRIPFLAGS ?= $(STRIPFLAGS)
8ff2f216109b 8164120: The minimal VM should be stripped using --strip-unneeded
erikj
parents: 40010
diff changeset
   204
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   205
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   206
# Now set up the actual compilation of the main hotspot native library
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   207
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   208
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
41193
9e274c9c3047 8160630: libjimage.so and others should link statically to libgcc
erikj
parents: 40010
diff changeset
   209
    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   210
    LIBRARY := jvm, \
41277
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   211
    OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   212
    SRC := $(JVM_SRC_DIRS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   213
    EXCLUDES := $(JVM_EXCLUDES), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   214
    EXCLUDE_FILES := $(JVM_EXCLUDE_FILES), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   215
    EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   216
    EXTRA_OBJECT_FILES := $(DTRACE_EXTRA_OBJECT_FILES), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   217
    CFLAGS := $(JVM_CFLAGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   218
    CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   219
    CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   220
    vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
46630
75aa3e39d02c 8182299: Enable disabled clang warnings, build on OSX 10 + Xcode 8
jwilhelm
parents: 46560
diff changeset
   221
    DISABLED_WARNINGS_clang := tautological-compare, \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   222
    DISABLED_WARNINGS_xlc := 1540-0216 1540-0198 1540-1090 1540-1639 \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   223
        1540-1088 1500-010, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   224
    ASFLAGS := $(JVM_ASFLAGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   225
    LDFLAGS := $(JVM_LDFLAGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   226
    LIBS := $(JVM_LIBS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   227
    OPTIMIZATION := $(JVM_OPTIMIZATION), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   228
    OBJECT_DIR := $(JVM_OUTPUTDIR)/objs, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   229
    MAPFILE := $(JVM_MAPFILE), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   230
    USE_MAPFILE_FOR_SYMBOLS := true, \
41674
8ff2f216109b 8164120: The minimal VM should be stripped using --strip-unneeded
erikj
parents: 40010
diff changeset
   231
    STRIPFLAGS := $(JVM_STRIPFLAGS), \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   232
    EMBED_MANIFEST := true, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   233
    RC_FLAGS := $(JVM_RCFLAGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   234
    VERSIONINFO_RESOURCE := $(HOTSPOT_TOPDIR)/src/os/windows/vm/version.rc, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   235
    PRECOMPILED_HEADER := $(JVM_PRECOMPILED_HEADER), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   236
    PRECOMPILED_HEADER_EXCLUDE := $(JVM_PRECOMPILED_HEADER_EXCLUDE), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   237
))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   238
41277
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   239
ifeq ($(OPENJDK_TARGET_OS), windows)
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   240
  # It doesn't matter which jvm.lib file gets exported, but we need
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   241
  # to pick just one.
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   242
  ifeq ($(JVM_VARIANT), $(firstword $(JVM_VARIANTS)))
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   243
    $(eval $(call SetupCopyFiles, COPY_JVM_LIB, \
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   244
        DEST := $(LIB_OUTPUTDIR), \
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   245
        FILES :=$(JVM_VARIANT_OUTPUTDIR)/libjvm/objs/jvm.lib, \
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   246
    ))
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   247
    TARGETS += $(COPY_JVM_LIB)
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   248
  endif
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   249
endif
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 41193
diff changeset
   250
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   251
# AIX warning explanation:
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   252
# 1500-010  : (W) WARNING in ...: Infinite loop.  Program may not stop.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   253
#             There are several infinite loops in the vm, so better suppress.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   254
# 1540-0198 : (W) The omitted keyword "private" is assumed for base class "...".
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   255
# 1540-0216 : (W) An expression of type .. cannot be converted to type ..
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   256
#             In hotspot this fires for functionpointer to pointer conversions
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   257
# 1540-1088 : (W) The exception specification is being ignored.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   258
#             In hotspot this is caused by throw() in declaration of new() in nmethod.hpp.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   259
# 1540-1090 : (I) The destructor of "..." might not be called.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   260
# 1540-1639 : (I) The behavior of long type bit fields has changed ...
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   261
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   262
# Include mapfile generation. It relies on BUILD_LIBJVM_ALL_OBJS which is only
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   263
# defined after the above call to BUILD_LIBJVM. Mapfile will be generated
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   264
# after all object files are built, but before the jvm library is linked.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   265
include lib/JvmMapfile.gmk
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   266
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   267
TARGETS += $(BUILD_LIBJVM)