hotspot/make/lib/CompileJvm.gmk
author erikj
Tue, 26 Apr 2016 13:35:28 +0200
changeset 38097 1ca3d6f508b1
parent 37437 hotspot/makefiles/lib/CompileJvm.gmk@f824aabc7af8
child 40010 e32d5e545789
permissions -rw-r--r--
8150601: Remove the old Hotspot build system Reviewed-by: ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     1
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     2
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
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
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    63
JVM_CFLAGS_TARGET_DEFINES += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    64
    -DTARGET_OS_FAMILY_$(HOTSPOT_TARGET_OS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    65
    -DTARGET_ARCH_MODEL_$(HOTSPOT_TARGET_CPU) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    66
    -DTARGET_ARCH_$(HOTSPOT_TARGET_CPU_ARCH) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    67
    -DTARGET_OS_ARCH_MODEL_$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    68
    -DTARGET_OS_ARCH_$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    69
    -DTARGET_COMPILER_$(HOTSPOT_TOOLCHAIN_TYPE) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    70
    -D$(HOTSPOT_TARGET_CPU_DEFINE) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    71
    -DHOTSPOT_LIB_ARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    72
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    73
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    74
ifeq ($(DEBUG_LEVEL), release)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    75
  # For hotspot, release builds differ internally between "optimized" and "product"
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    76
  # in that "optimize" does not define PRODUCT.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    77
  ifneq ($(HOTSPOT_DEBUG_LEVEL), optimized)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    78
    JVM_CFLAGS_DEBUGLEVEL := -DPRODUCT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    79
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    80
else ifeq ($(DEBUG_LEVEL), fastdebug)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    81
  JVM_CFLAGS_DEBUGLEVEL := -DASSERT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    82
  ifeq ($(filter $(OPENJDK_TARGET_OS), windows aix), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    83
    # NOTE: Old build did not define CHECK_UNHANDLED_OOPS on Windows and AIX.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    84
    JVM_CFLAGS_DEBUGLEVEL += -DCHECK_UNHANDLED_OOPS
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    85
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    86
else ifeq ($(DEBUG_LEVEL), slowdebug)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    87
  # _NMT_NOINLINE_ informs NMT that no inlining is done by the compiler
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    88
  JVM_CFLAGS_DEBUGLEVEL := -DASSERT -D_NMT_NOINLINE_
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
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    91
JVM_CFLAGS += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    92
    $(JVM_CFLAGS_DEBUGLEVEL) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    93
    $(JVM_CFLAGS_TARGET_DEFINES) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    94
    $(JVM_CFLAGS_FEATURES) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    95
    $(JVM_CFLAGS_INCLUDES) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    96
    $(EXTRA_CFLAGS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    97
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    98
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    99
JVM_LDFLAGS += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   100
    $(SHARED_LIBRARY_FLAGS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   101
    $(JVM_LDFLAGS_FEATURES) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   102
    $(EXTRA_LDFLAGS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   103
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   104
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   105
JVM_LIBS += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   106
    $(JVM_LIBS_FEATURES) \
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
# These files and directories are always excluded
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   110
JVM_EXCLUDE_FILES += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp args.cc
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   111
JVM_EXCLUDES += adlc
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   112
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   113
# Needed by vm_version.cpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   114
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   115
  OPENJDK_TARGET_CPU_VM_VERSION := amd64
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   116
else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   117
  OPENJDK_TARGET_CPU_VM_VERSION := sparc
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   118
else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   119
  OPENJDK_TARGET_CPU_VM_VERSION := $(OPENJDK_TARGET_CPU)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   120
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   121
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   122
CFLAGS_VM_VERSION := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   123
    $(VERSION_CFLAGS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   124
    -DHOTSPOT_VERSION_STRING='"$(VERSION_STRING)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   125
    -DDEBUG_LEVEL='"$(DEBUG_LEVEL)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   126
    -DHOTSPOT_BUILD_USER='"$(USERNAME)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   127
    -DHOTSPOT_VM_DISTRO='"$(HOTSPOT_VM_DISTRO)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   128
    -DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   129
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   130
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   131
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   132
ifeq ($(USE_PRECOMPILED_HEADER), 0)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   133
  JVM_CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   134
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   135
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   136
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   137
# Platform specific setup
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   138
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   139
ifneq ($(filter $(OPENJDK_TARGET_OS), linux macosx windows), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   140
  JVM_PRECOMPILED_HEADER := $(HOTSPOT_TOPDIR)/src/share/vm/precompiled/precompiled.hpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   141
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   142
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   143
ifneq ($(filter $(OPENJDK_TARGET_OS), macosx aix solaris), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   144
  # On macosx, aix and solaris we have to link with the C++ compiler
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   145
  JVM_TOOLCHAIN := TOOLCHAIN_LINK_CXX
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   146
else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   147
  JVM_TOOLCHAIN := TOOLCHAIN_DEFAULT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   148
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   149
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   150
ifeq ($(OPENJDK_TARGET_CPU), x86)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   151
  JVM_EXCLUDE_PATTERNS += x86_64
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   152
else ifeq ($(OPENJDK_TARGET_CPU), x86_64)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   153
  JVM_EXCLUDE_PATTERNS += x86_32
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   154
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   155
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   156
# Inline assembly for solaris
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   157
ifeq ($(OPENJDK_TARGET_OS), solaris)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   158
  ifeq ($(OPENJDK_TARGET_CPU), x86_64)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   159
    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
   160
  else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   161
    JVM_CFLAGS += $(HOTSPOT_TOPDIR)/src/os_cpu/solaris_sparc/vm/solaris_sparc.il
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   162
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   163
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   164
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   165
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-sparcv9)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   166
  ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), false)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   167
    # NOTE: In the old build, we weirdly enough set -g/-g0 always, regardless
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   168
    # of if debug symbols were needed. Without it, compilation fails on
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   169
    # sparc! :-(
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   170
    JVM_CFLAGS += -g0
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
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   173
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   174
ifeq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   175
  ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   176
    RC_DESC := 64-Bit$(SPACE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   177
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   178
  JVM_RCFLAGS += -D"HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(RC_DESC)$(JVM_VARIANT) VM"
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
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   181
ifeq ($(OPENJDK_TARGET_OS), macosx)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   182
  # NOTE: The old build did not strip binaries on macosx.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   183
  JVM_STRIP_SYMBOLS := false
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   184
else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   185
  JVM_STRIP_SYMBOLS := true
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   186
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   187
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   188
JVM_OPTIMIZATION ?= HIGHEST_JVM
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   189
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   190
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   191
# Now set up the actual compilation of the main hotspot native library
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   192
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   193
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   194
    TOOLCHAIN := $(JVM_TOOLCHAIN), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   195
    LIBRARY := jvm, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   196
    OUTPUT_DIR := $(JVM_OUTPUTDIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   197
    SRC := $(JVM_SRC_DIRS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   198
    EXCLUDES := $(JVM_EXCLUDES), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   199
    EXCLUDE_FILES := $(JVM_EXCLUDE_FILES), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   200
    EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   201
    EXTRA_OBJECT_FILES := $(DTRACE_EXTRA_OBJECT_FILES), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   202
    CFLAGS := $(JVM_CFLAGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   203
    CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   204
    CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   205
    vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   206
    DISABLED_WARNINGS_clang := delete-non-virtual-dtor dynamic-class-memaccess \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   207
        empty-body format logical-op-parentheses parentheses \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   208
        parentheses-equality switch tautological-compare, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   209
    DISABLED_WARNINGS_xlc := 1540-0216 1540-0198 1540-1090 1540-1639 \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   210
        1540-1088 1500-010, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   211
    ASFLAGS := $(JVM_ASFLAGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   212
    LDFLAGS := $(JVM_LDFLAGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   213
    LIBS := $(JVM_LIBS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   214
    OPTIMIZATION := $(JVM_OPTIMIZATION), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   215
    OBJECT_DIR := $(JVM_OUTPUTDIR)/objs, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   216
    MAPFILE := $(JVM_MAPFILE), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   217
    USE_MAPFILE_FOR_SYMBOLS := true, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   218
    STRIP_SYMBOLS := $(JVM_STRIP_SYMBOLS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   219
    EMBED_MANIFEST := true, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   220
    RC_FLAGS := $(JVM_RCFLAGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   221
    VERSIONINFO_RESOURCE := $(HOTSPOT_TOPDIR)/src/os/windows/vm/version.rc, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   222
    PRECOMPILED_HEADER := $(JVM_PRECOMPILED_HEADER), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   223
    PRECOMPILED_HEADER_EXCLUDE := $(JVM_PRECOMPILED_HEADER_EXCLUDE), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   224
))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   225
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   226
# AIX warning explanation:
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   227
# 1500-010  : (W) WARNING in ...: Infinite loop.  Program may not stop.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   228
#             There are several infinite loops in the vm, so better suppress.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   229
# 1540-0198 : (W) The omitted keyword "private" is assumed for base class "...".
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   230
# 1540-0216 : (W) An expression of type .. cannot be converted to type ..
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   231
#             In hotspot this fires for functionpointer to pointer conversions
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   232
# 1540-1088 : (W) The exception specification is being ignored.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   233
#             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
   234
# 1540-1090 : (I) The destructor of "..." might not be called.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   235
# 1540-1639 : (I) The behavior of long type bit fields has changed ...
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   236
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   237
# Include mapfile generation. It relies on BUILD_LIBJVM_ALL_OBJS which is only
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   238
# defined after the above call to BUILD_LIBJVM. Mapfile will be generated
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   239
# after all object files are built, but before the jvm library is linked.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   240
include lib/JvmMapfile.gmk
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   241
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   242
TARGETS += $(BUILD_LIBJVM)