hotspot/make/lib/JvmMapfile.gmk
author lana
Tue, 08 Aug 2017 22:52:18 +0000
changeset 46168 a586a1c1a9e3
parent 38255 5784bccf53b0
permissions -rw-r--r--
Merge
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
$(eval $(call IncludeCustomExtension, hotspot, lib/JvmMapfile.gmk))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    27
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    28
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    29
# Combine a list of static symbols
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    30
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    31
ifneq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), windows-x86_64)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    32
  # On Windows x86_64, we should not have any symbols at all, since that
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    33
  # results in duplicate warnings from the linker (JDK-8043491).
38097
1ca3d6f508b1 8150601: Remove the old Hotspot build system
erikj
parents: 37437
diff changeset
    34
  SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/make/symbols/symbols-shared
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    35
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    36
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    37
ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
38097
1ca3d6f508b1 8150601: Remove the old Hotspot build system
erikj
parents: 37437
diff changeset
    38
  SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/make/symbols/symbols-unix
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    39
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    40
38097
1ca3d6f508b1 8150601: Remove the old Hotspot build system
erikj
parents: 37437
diff changeset
    41
ifneq ($(wildcard $(HOTSPOT_TOPDIR)/make/symbols/symbols-$(OPENJDK_TARGET_OS)), )
1ca3d6f508b1 8150601: Remove the old Hotspot build system
erikj
parents: 37437
diff changeset
    42
  SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/make/symbols/symbols-$(OPENJDK_TARGET_OS)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    43
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    44
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    45
ifneq ($(findstring debug, $(DEBUG_LEVEL)), )
38097
1ca3d6f508b1 8150601: Remove the old Hotspot build system
erikj
parents: 37437
diff changeset
    46
  ifneq ($(wildcard $(HOTSPOT_TOPDIR)/make/symbols/symbols-$(OPENJDK_TARGET_OS)-debug), )
1ca3d6f508b1 8150601: Remove the old Hotspot build system
erikj
parents: 37437
diff changeset
    47
    SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/make/symbols/symbols-$(OPENJDK_TARGET_OS)-debug
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    48
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    49
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    50
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    51
ifeq ($(OPENJDK_TARGET_OS), solaris)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    52
  ifeq ($(call check-jvm-feature, dtrace), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    53
    # Additional mapfiles that are only used when dtrace is enabled
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    54
    ifeq ($(call check-jvm-feature, compiler2), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    55
      # This also covers the case of compiler1+compiler2.
38097
1ca3d6f508b1 8150601: Remove the old Hotspot build system
erikj
parents: 37437
diff changeset
    56
      SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/make/symbols/symbols-solaris-dtrace-compiler2
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    57
    else ifeq ($(call check-jvm-feature, compiler1), true)
38097
1ca3d6f508b1 8150601: Remove the old Hotspot build system
erikj
parents: 37437
diff changeset
    58
      SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/make/symbols/symbols-solaris-dtrace-compiler1
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    59
    endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    60
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    61
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    62
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    63
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    64
# Create a dynamic list of symbols from the built object files. This is highly
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    65
# platform dependent.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    66
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    67
ifeq ($(OPENJDK_TARGET_OS), linux)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    68
  DUMP_SYMBOLS_CMD := $(NM) --defined-only *.o
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    69
  ifneq ($(FILTER_SYMBOLS_PATTERN), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    70
    FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    71
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    72
  FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^_ZTV|^gHotSpotVM|^UseSharedSpaces$$
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    73
  FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|^_ZN9Arguments17SharedArchivePathE$$
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    74
  FILTER_SYMBOLS_AWK_SCRIPT := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    75
      '{ \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    76
        if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    77
      }'
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    78
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    79
else ifeq ($(OPENJDK_TARGET_OS), solaris)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    80
  DUMP_SYMBOLS_CMD := $(NM) -p *.o
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    81
  ifneq ($(FILTER_SYMBOLS_PATTERN), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    82
    FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
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
  FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^__1c.*__vtbl_$$|^gHotSpotVM
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    85
  FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|^UseSharedSpaces$$
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    86
  FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|^__1cJArgumentsRSharedArchivePath_$$
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    87
  FILTER_SYMBOLS_AWK_SCRIPT := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    88
      '{ \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    89
        if ($$2 == "U") next; \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    90
        if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    91
      }'
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    92
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    93
else ifeq ($(OPENJDK_TARGET_OS), macosx)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    94
  # nm on macosx prints out "warning: nm: no name list" to stderr for
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    95
  # files without symbols. Hide this, even at the expense of hiding real errors.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    96
  DUMP_SYMBOLS_CMD := $(NM) -Uj *.o 2> /dev/null
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    97
  ifneq ($(FILTER_SYMBOLS_PATTERN), )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    98
    FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    99
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   100
  FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^_ZTV|^gHotSpotVM
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   101
  FILTER_SYMBOLS_AWK_SCRIPT := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   102
      '{ \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   103
        if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   104
      }'
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   105
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   106
# NOTE: The script is from the old build. It is broken and finds no symbols.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   107
# The script below might be what was intended, but it failes to link with tons
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   108
# of 'cannot export hidden symbol vtable for X'.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   109
#  '{ if ($$1 ~ /^__ZTV/ || $$1 ~ /^_gHotSpotVM/) print substr($$1, 2) }'
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   110
else ifeq ($(OPENJDK_TARGET_OS), aix)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   111
  # NOTE: The old build had the solution below. This should to be fixed in
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   112
  # configure instead.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   113
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   114
  # On AIX we have to prevent that we pick up the 'nm' version from the GNU binutils
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   115
  # which may be installed under /opt/freeware/bin. So better use an absolute path here!
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   116
  # NM=/usr/bin/nm
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   117
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   118
  DUMP_SYMBOLS_CMD := $(NM) -X64 -B -C *.o
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   119
  FILTER_SYMBOLS_AWK_SCRIPT := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   120
      '{ \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   121
        if (($$2="d" || $$2="D") && ($$3 ~ /^__vft/ || $$3 ~ /^gHotSpotVM/)) print $$3; \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   122
        if ($$3 ~ /^UseSharedSpaces$$/) print $$3; \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   123
        if ($$3 ~ /^SharedArchivePath__9Arguments$$/) print $$3; \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   124
       }'
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   125
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   126
else ifeq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   127
  DUMP_SYMBOLS_CMD := $(DUMPBIN) -symbols *.obj
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   128
  FILTER_SYMBOLS_AWK_SCRIPT := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   129
      '{ \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   130
        if ($$7 ~ /??_7.*@@6B@/ && $$7 !~ /type_info/) print $$7; \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   131
      }'
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   132
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   133
else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   134
  $(error Unknown target OS $(OPENJDK_TARGET_OS) in JvmMapfile.gmk)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   135
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   136
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   137
# A more correct solution would be to send BUILD_LIBJVM_ALL_OBJS instead of
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   138
# cd && *.o, but this will result in very long command lines, which is
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   139
# problematic on some platforms.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   140
$(JVM_OUTPUTDIR)/symbols-objects: $(BUILD_LIBJVM_ALL_OBJS)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   141
	$(call LogInfo, Generating symbol list from object files)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   142
	$(CD) $(JVM_OUTPUTDIR)/objs && \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   143
	  $(DUMP_SYMBOLS_CMD) | $(NAWK) $(FILTER_SYMBOLS_AWK_SCRIPT) | $(SORT) -u > $@
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   144
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   145
SYMBOLS_SRC += $(JVM_OUTPUTDIR)/symbols-objects
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   146
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   147
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   148
# Now concatenate all symbol lists into a single file and remove comments.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   149
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   150
$(JVM_OUTPUTDIR)/symbols: $(SYMBOLS_SRC)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   151
	$(SED) -e '/^#/d' $^ > $@
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   152
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   153
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   154
# Finally convert the symbol list into a platform-specific mapfile
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   155
38255
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   156
ifeq ($(OPENJDK_TARGET_OS), macosx)
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   157
  # On macosx, we need to add a leading underscore
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   158
  define create-mapfile-work
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   159
	  $(AWK) '{ if ($$0 ~ ".") { print "  _" $$0 } }'  < $^ > $@.tmp
38255
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   160
  endef
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   161
else ifeq ($(OPENJDK_TARGET_OS), windows)
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   162
  # On windows, add an 'EXPORTS' header
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   163
  define create-mapfile-work
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   164
	  $(ECHO) "EXPORTS" > $@.tmp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   165
	  $(AWK) '{ if ($$0 ~ ".") { print "  " $$0 } }'  < $^ >> $@.tmp
38255
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   166
  endef
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   167
else
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   168
  # Assume standard linker script
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   169
  define create-mapfile-work
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   170
	  $(PRINTF) "SUNWprivate_1.1 { \n  global: \n" > $@.tmp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   171
	  $(AWK) '{ if ($$0 ~ ".") { print "    " $$0 ";" } }' < $^ >> $@.tmp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   172
	  $(PRINTF) "  local: \n    *; \n }; \n" >> $@.tmp
38255
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   173
  endef
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   174
endif
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   175
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   176
define create-mapfile
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   177
	$(call LogInfo, Creating mapfile)
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   178
	$(call MakeDir, $(@D))
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   179
	$(call create-mapfile-work)
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   180
	$(RM) $@
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   181
	$(MV) $@.tmp $@
38255
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   182
endef
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   183
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   184
$(JVM_MAPFILE): $(JVM_OUTPUTDIR)/symbols
5784bccf53b0 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 38097
diff changeset
   185
	$(call create-mapfile)