make/linux/makefiles/vm.make

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

author
andrew
date
Fri, 28 Aug 2020 07:38:21 +0100
changeset 9995
633a3d28d2fe
parent 9896
1b8c45b8216a
child 10015
eb7ce841ccec
permissions
-rw-r--r--

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

duke@435 1 #
andrew@9634 2 # Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
duke@435 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 #
duke@435 5 # This code is free software; you can redistribute it and/or modify it
duke@435 6 # under the terms of the GNU General Public License version 2 only, as
duke@435 7 # published by the Free Software Foundation.
duke@435 8 #
duke@435 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 # accompanied this code).
duke@435 14 #
duke@435 15 # You should have received a copy of the GNU General Public License version
duke@435 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 #
trims@1907 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 # or visit www.oracle.com if you need additional information or have any
trims@1907 21 # questions.
sla@5237 22 #
duke@435 23 #
duke@435 24
duke@435 25 # Rules to build JVM and related libraries, included from vm.make in the build
duke@435 26 # directory.
duke@435 27
duke@435 28 # Common build rules.
kamg@526 29 MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
duke@435 30 include $(MAKEFILES_DIR)/rules.make
kamg@2515 31 include $(GAMMADIR)/make/altsrc.make
duke@435 32
duke@435 33 default: build
duke@435 34
duke@435 35 #----------------------------------------------------------------------
duke@435 36 # Defs
duke@435 37
duke@435 38 GENERATED = ../generated
stefank@2314 39 DEP_DIR = $(GENERATED)/dependencies
duke@435 40
stefank@2314 41 # reads the generated files defining the set of .o's and the .o .h dependencies
stefank@2314 42 -include $(DEP_DIR)/*.d
duke@435 43
duke@435 44 # read machine-specific adjustments (%%% should do this via buildtree.make?)
erikj@3649 45 ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
never@1445 46 include $(MAKEFILES_DIR)/zeroshark.make
never@1445 47 else
dlong@7598 48 BUILDARCH_MAKE = $(MAKEFILES_DIR)/$(BUILDARCH).make
dlong@7598 49 ALT_BUILDARCH_MAKE = $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/$(BUILDARCH).make
dlong@7598 50 include $(if $(wildcard $(ALT_BUILDARCH_MAKE)),$(ALT_BUILDARCH_MAKE),$(BUILDARCH_MAKE))
never@1445 51 endif
duke@435 52
duke@435 53 # set VPATH so make knows where to look for source files
stefank@2314 54 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
duke@435 55 # The adfiles directory contains ad_<arch>.[ch]pp.
duke@435 56 # The jvmtifiles directory contains jvmti*.[ch]pp
apetushkov@9858 57 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles $(GENERATED)/jfrfiles
stefank@2314 58 VPATH += $(Src_Dirs_V:%=%:)
duke@435 59
stefank@2314 60 # set INCLUDES for C preprocessor.
stefank@2314 61 Src_Dirs_I += $(GENERATED)
stefank@2314 62 # The order is important for the precompiled headers to work.
stefank@2314 63 INCLUDES += $(PRECOMPILED_HEADER_DIR:%=-I%) $(Src_Dirs_I:%=-I%)
duke@435 64
dcubed@3150 65 # SYMFLAG is used by {jsig,saproc}.make
dcubed@3724 66 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3150 67 # always build with debug info when we can create .debuginfo files
duke@435 68 SYMFLAG = -g
duke@435 69 else
dcubed@3150 70 ifeq (${VERSION}, debug)
dcubed@3150 71 SYMFLAG = -g
dcubed@3150 72 else
dcubed@3150 73 SYMFLAG =
dcubed@3150 74 endif
duke@435 75 endif
duke@435 76
sla@5237 77 # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
duke@435 78 # in $(GAMMADIR)/make/defs.make
duke@435 79 ifeq ($(HOTSPOT_BUILD_VERSION),)
duke@435 80 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)\""
duke@435 81 else
duke@435 82 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)\""
duke@435 83 endif
duke@435 84
duke@435 85 # The following variables are defined in the generated flags.make file.
duke@435 86 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
duke@435 87 JRE_VERSION = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
jrose@535 88 HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
duke@435 89 BUILD_TARGET = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
duke@435 90 BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
duke@435 91 VM_DISTRO = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
duke@435 92
erikj@3518 93 CXXFLAGS = \
duke@435 94 ${SYSDEFS} \
duke@435 95 ${INCLUDES} \
duke@435 96 ${BUILD_VERSION} \
duke@435 97 ${BUILD_TARGET} \
duke@435 98 ${BUILD_USER} \
jrose@535 99 ${HS_LIB_ARCH} \
duke@435 100 ${VM_DISTRO}
duke@435 101
ohrstrom@3517 102 # This is VERY important! The version define must only be supplied to vm_version.o
ohrstrom@3517 103 # If not, ccache will not re-use the cache at all, since the version string might contain
sla@5237 104 # a time and date.
andrew@9634 105 CXXFLAGS/vm_version.o += ${JRE_VERSION} ${VERSION_CFLAGS}
andrew@9634 106 CXXFLAGS/arguments.o += ${VERSION_CFLAGS}
mikael@4602 107
mikael@4602 108 CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
mikael@4602 109
mikael@4602 110 # File specific flags
mikael@4602 111 CXXFLAGS += $(CXXFLAGS/BYFILE)
mikael@4602 112
tamao@5309 113 # Large File Support
tamao@5309 114 ifneq ($(LP64), 1)
tamao@5309 115 CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64
tamao@5309 116 endif # ifneq ($(LP64), 1)
ohrstrom@3517 117
duke@435 118 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
duke@435 119 CFLAGS += $(CFLAGS_WARN/BYFILE)
duke@435 120
duke@435 121 # Do not use C++ exception handling
duke@435 122 CFLAGS += $(CFLAGS/NOEX)
duke@435 123
duke@435 124 # Extra flags from gnumake's invocation or environment
duke@435 125 CFLAGS += $(EXTRA_CFLAGS)
sgehwolf@9330 126 LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)
sgehwolf@9819 127 ASFLAGS += $(EXTRA_ASFLAGS)
duke@435 128
dsamersoff@2837 129 # Don't set excutable bit on stack segment
dsamersoff@2837 130 # the same could be done by separate execstack command
dsamersoff@2837 131 LFLAGS += -Xlinker -z -Xlinker noexecstack
dsamersoff@2837 132
duke@435 133 LIBS += -lm -ldl -lpthread
duke@435 134
duke@435 135 # By default, link the *.o into the library, not the executable.
duke@435 136 LINK_INTO$(LINK_INTO) = LIBJVM
duke@435 137
duke@435 138 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
duke@435 139
duke@435 140 #----------------------------------------------------------------------
duke@435 141 # jvm_db & dtrace
duke@435 142 include $(MAKEFILES_DIR)/dtrace.make
duke@435 143
duke@435 144 #----------------------------------------------------------------------
duke@435 145 # JVM
duke@435 146
phh@1558 147 JVM = jvm
phh@1558 148 LIBJVM = lib$(JVM).so
duke@435 149
dcubed@3150 150 LIBJVM_DEBUGINFO = lib$(JVM).debuginfo
dcubed@3724 151 LIBJVM_DIZ = lib$(JVM).diz
dcubed@3150 152
andrew@9995 153 ifneq ($(ENABLE_JFR),true)
apetushkov@9858 154 EXCLUDE_JFR_PATHS:= -o -name jfr -prune
apetushkov@9858 155 endif
kamg@2515 156 SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
stefank@2314 157
kamg@2515 158 SOURCE_PATHS=\
kamg@2515 159 $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
apetushkov@9858 160 \( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) $(EXCLUDE_JFR_PATHS) \))
kamg@2515 161 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
kamg@2515 162 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
kamg@2515 163 SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
kamg@2515 164 SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
stefank@2314 165
sla@5237 166 CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
apetushkov@9858 167 CORE_PATHS+=$(GENERATED)/jvmtifiles $(GENERATED)/jfrfiles
kamg@2515 168
kamg@2515 169 COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
kamg@2515 170 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1
kamg@2515 171
kamg@2515 172 COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto)
kamg@2515 173 COMPILER2_PATHS += $(call altsrc,$(HS_COMMON_SRC)/share/vm/libadt)
kamg@2515 174 COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/opto
kamg@2515 175 COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/libadt
kamg@2515 176 COMPILER2_PATHS += $(GENERATED)/adfiles
stefank@2314 177
dholmes@2752 178 SHARK_PATHS := $(GAMMADIR)/src/share/vm/shark
dholmes@2752 179
stefank@2314 180 # Include dirs per type.
stefank@2314 181 Src_Dirs/CORE := $(CORE_PATHS)
stefank@2314 182 Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS)
stefank@2314 183 Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS)
stefank@2314 184 Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS)
stefank@2314 185 Src_Dirs/ZERO := $(CORE_PATHS)
dholmes@2752 186 Src_Dirs/SHARK := $(CORE_PATHS) $(SHARK_PATHS)
stefank@2314 187 Src_Dirs := $(Src_Dirs/$(TYPE))
stefank@2314 188
neliasso@4949 189 COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp c2_\* runtime_\*
stefank@2314 190 COMPILER1_SPECIFIC_FILES := c1_\*
stefank@2314 191 SHARK_SPECIFIC_FILES := shark
stefank@2314 192 ZERO_SPECIFIC_FILES := zero
stefank@2314 193
stefank@2314 194 # Always exclude these.
jprovino@4165 195 Src_Files_EXCLUDE += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp
stefank@2314 196
stefank@2314 197 # Exclude per type.
stefank@2314 198 Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
stefank@2314 199 Src_Files_EXCLUDE/COMPILER1 := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
stefank@2314 200 Src_Files_EXCLUDE/COMPILER2 := $(COMPILER1_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES)
stefank@2314 201 Src_Files_EXCLUDE/TIERED := $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES)
stefank@2314 202 Src_Files_EXCLUDE/ZERO := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
stefank@2314 203 Src_Files_EXCLUDE/SHARK := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES)
stefank@2314 204
stefank@2314 205 Src_Files_EXCLUDE += $(Src_Files_EXCLUDE/$(TYPE))
stefank@2314 206
stefank@2314 207 # Special handling of arch model.
stefank@2314 208 ifeq ($(Platform_arch_model), x86_32)
stefank@2314 209 Src_Files_EXCLUDE += \*x86_64\*
stefank@2314 210 endif
stefank@2314 211 ifeq ($(Platform_arch_model), x86_64)
stefank@2314 212 Src_Files_EXCLUDE += \*x86_32\*
stefank@2314 213 endif
stefank@2314 214
dholmes@5442 215 # Alternate vm.make
dholmes@5442 216 # This has to be included here to allow changes to the source
dholmes@5442 217 # directories and excluded files before they are expanded
dholmes@5442 218 # by the definition of Src_Files.
dholmes@5442 219 -include $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/vm.make
dholmes@5442 220
stefank@2314 221 # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE.
stefank@2314 222 define findsrc
stefank@2368 223 $(notdir $(shell find $(1)/. ! -name . -prune \
stefank@2368 224 -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \
stefank@2368 225 -a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \)))
stefank@2314 226 endef
stefank@2314 227
stefank@2314 228 Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e)))
stefank@2314 229
stefank@2326 230 Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files))))
stefank@2314 231
duke@435 232 JVM_OBJ_FILES = $(Obj_Files)
duke@435 233
duke@435 234 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
duke@435 235
jwilhelm@7059 236 mapfile : $(MAPFILE) vm.def mapfile_ext
duke@435 237 rm -f $@
never@1729 238 awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE") \
jwilhelm@7059 239 { system ("cat mapfile_ext"); system ("cat vm.def"); } \
never@1729 240 else \
never@1729 241 { print $$0 } \
never@1729 242 }' > $@ < $(MAPFILE)
duke@435 243
duke@435 244 mapfile_reorder : mapfile $(REORDERFILE)
duke@435 245 rm -f $@
duke@435 246 cat $^ > $@
duke@435 247
dlong@7573 248 VMDEF_PAT = ^_ZTV
dlong@7573 249 VMDEF_PAT := ^gHotSpotVM|$(VMDEF_PAT)
dlong@7573 250 VMDEF_PAT := ^UseSharedSpaces$$|$(VMDEF_PAT)
dlong@7573 251 VMDEF_PAT := ^_ZN9Arguments17SharedArchivePathE$$|$(VMDEF_PAT)
dlong@7573 252
never@1729 253 vm.def: $(Res_Files) $(Obj_Files)
dlong@7573 254 $(QUIETLY) $(NM) --defined-only $(Obj_Files) | sort -k3 -u | \
dlong@7573 255 awk '$$3 ~ /$(VMDEF_PAT)/ { print "\t" $$3 ";" }' > $@
never@1729 256
jwilhelm@7059 257 mapfile_ext:
jwilhelm@7059 258 rm -f $@
jwilhelm@7059 259 touch $@
jwilhelm@7059 260 if [ -f $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext ]; then \
jwilhelm@7059 261 cat $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext > $@; \
jwilhelm@7059 262 fi
jwilhelm@7059 263
erikj@3649 264 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
never@1445 265 STATIC_CXX = false
never@1445 266 else
twisti@2047 267 ifeq ($(ZERO_LIBARCH), ppc64)
twisti@2047 268 STATIC_CXX = false
twisti@2047 269 else
twisti@2047 270 STATIC_CXX = true
twisti@2047 271 endif
never@1445 272 endif
duke@435 273
duke@435 274 ifeq ($(LINK_INTO),AOUT)
duke@435 275 LIBJVM.o =
duke@435 276 LIBJVM_MAPFILE =
duke@435 277 LIBS_VM = $(LIBS)
duke@435 278 else
duke@435 279 LIBJVM.o = $(JVM_OBJ_FILES)
duke@435 280 LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
duke@435 281 LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
duke@435 282 LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
duke@435 283
duke@435 284 # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
duke@435 285 # get around library dependency and compatibility issues. Must use gcc not
duke@435 286 # g++ to link.
duke@435 287 ifeq ($(STATIC_CXX), true)
duke@435 288 LFLAGS_VM += $(STATIC_LIBGCC)
duke@435 289 LIBS_VM += $(STATIC_STDCXX)
duke@435 290 else
duke@435 291 LIBS_VM += -lstdc++
duke@435 292 endif
duke@435 293
duke@435 294 LIBS_VM += $(LIBS)
duke@435 295 endif
erikj@3649 296 ifeq ($(JVM_VARIANT_ZERO), true)
never@1445 297 LIBS_VM += $(LIBFFI_LIBS)
never@1445 298 endif
erikj@3649 299 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
erikj@3649 300 LIBS_VM += $(LIBFFI_LIBS) $(LLVM_LIBS)
twisti@2047 301 LFLAGS_VM += $(LLVM_LDFLAGS)
twisti@2047 302 endif
duke@435 303
erikj@3518 304 LINK_VM = $(LINK_LIB.CC)
duke@435 305
duke@435 306 # rule for building precompiled header
stefank@2314 307 $(PRECOMPILED_HEADER):
duke@435 308 $(QUIETLY) echo Generating precompiled header $@
stefank@2314 309 $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)
erikj@3518 310 $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE)
duke@435 311
duke@435 312 # making the library:
duke@435 313
duke@435 314 ifneq ($(JVM_BASE_ADDR),)
duke@435 315 # By default shared library is linked at base address == 0. Modify the
duke@435 316 # linker script if JVM prefers a different base location. It can also be
duke@435 317 # implemented with 'prelink -r'. But 'prelink' is not (yet) available on
duke@435 318 # our build platform (AS-2.1).
duke@435 319 LD_SCRIPT = libjvm.so.lds
duke@435 320 $(LD_SCRIPT): $(LIBJVM_MAPFILE)
duke@435 321 $(QUIETLY) { \
duke@435 322 rm -rf $@; \
duke@435 323 $(LINK_VM) -Wl,--verbose $(LFLAGS_VM) 2>&1 | \
duke@435 324 sed -e '/^======/,/^======/!d' \
duke@435 325 -e '/^======/d' \
duke@435 326 -e 's/0\( + SIZEOF_HEADERS\)/$(JVM_BASE_ADDR)\1/' \
duke@435 327 > $@; \
duke@435 328 }
duke@435 329 LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT)
duke@435 330 endif
duke@435 331
duke@435 332 # With more recent Redhat releases (or the cutting edge version Fedora), if
duke@435 333 # SELinux is configured to be enabled, the runtime linker will fail to apply
duke@435 334 # the text relocation to libjvm.so considering that it is built as a non-PIC
sla@5237 335 # DSO. To workaround that, we run chcon to libjvm.so after it is built. See
duke@435 336 # details in bug 6538311.
duke@435 337 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
duke@435 338 $(QUIETLY) { \
duke@435 339 echo Linking vm...; \
erikj@3518 340 $(LINK_LIB.CXX/PRE_HOOK) \
duke@435 341 $(LINK_VM) $(LD_SCRIPT_FLAG) \
ohair@4087 342 $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \
erikj@3518 343 $(LINK_LIB.CXX/POST_HOOK) \
duke@435 344 rm -f $@.1; ln -s $@ $@.1; \
bobv@2036 345 if [ \"$(CROSS_COMPILE_ARCH)\" = \"\" ] ; then \
bobv@2036 346 if [ -x /usr/sbin/selinuxenabled ] ; then \
bobv@2036 347 /usr/sbin/selinuxenabled; \
bobv@2036 348 if [ $$? = 0 ] ; then \
bobv@2036 349 /usr/bin/chcon -t textrel_shlib_t $@; \
bobv@2036 350 if [ $$? != 0 ]; then \
bobv@2036 351 echo "ERROR: Cannot chcon $@"; \
bobv@2036 352 fi \
bobv@2036 353 fi \
bobv@2036 354 fi \
bobv@2036 355 fi \
duke@435 356 }
dholmes@4243 357
dholmes@4243 358 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
sgehwolf@9357 359 ifneq ($(STRIP_POLICY),no_strip)
dcubed@3150 360 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
sgehwolf@9357 361 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
sgehwolf@9357 362 endif
sgehwolf@9346 363 ifeq ($(STRIP_POLICY),all_strip)
dcubed@3150 364 $(QUIETLY) $(STRIP) $@
dholmes@4243 365 else
dholmes@4243 366 ifeq ($(STRIP_POLICY),min_strip)
dcubed@3150 367 $(QUIETLY) $(STRIP) -g $@
sgehwolf@9346 368 endif
dholmes@4243 369 # implied else here is no stripping at all
dholmes@4243 370 endif
sgehwolf@9357 371 ifneq ($(STRIP_POLICY),no_strip)
sgehwolf@9357 372 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@4344 373 $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
dcubed@4344 374 $(RM) $(LIBJVM_DEBUGINFO)
sgehwolf@9357 375 endif
dcubed@3150 376 endif
dcubed@3150 377 endif
duke@435 378
dcubed@3150 379 DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR)
dcubed@3150 380 DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM)
dcubed@3150 381 DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO)
dcubed@3724 382 DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
duke@435 383
duke@435 384 install_jvm: $(LIBJVM)
duke@435 385 @echo "Copying $(LIBJVM) to $(DEST_JVM)"
dcubed@3150 386 $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
dcubed@3150 387 cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
dcubed@3724 388 $(QUIETLY) test -f $(LIBJVM_DIZ) && \
dcubed@3724 389 cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
duke@435 390 $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
duke@435 391
duke@435 392 #----------------------------------------------------------------------
duke@435 393 # Other files
duke@435 394
duke@435 395 # Signal interposition library
duke@435 396 include $(MAKEFILES_DIR)/jsig.make
duke@435 397
duke@435 398 # Serviceability agent
duke@435 399 include $(MAKEFILES_DIR)/saproc.make
duke@435 400
duke@435 401 #----------------------------------------------------------------------
duke@435 402
mgerdin@4637 403 build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC) dtraceCheck
duke@435 404
duke@435 405 install: install_jvm install_jsig install_saproc
duke@435 406
dholmes@5442 407 .PHONY: default build install install_jvm $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/$(BUILDARCH).make $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/vm.make

mercurial