make/solaris/makefiles/vm.make

Print this page


   1 #
   2 # Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #


 136 else
 137 LIBS += -ldl -lthread -lsocket $(LIBM) -lsched -ldoor -ldemangle
 138 endif # 502
 139 endif # 505
 140 else
 141 LIBS += -lsocket -lsched -ldl $(LIBM) -lthread -lc -ldemangle
 142 endif # sparcWorks
 143 
 144 LIBS += -lkstat
 145 
 146 # By default, link the *.o into the library, not the executable.
 147 LINK_INTO$(LINK_INTO) = LIBJVM
 148 
 149 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
 150 
 151 #----------------------------------------------------------------------
 152 # jvm_db & dtrace
 153 include $(MAKEFILES_DIR)/dtrace.make
 154 
 155 #----------------------------------------------------------------------
 156 # add_gnu_debuglink tool
 157 include $(MAKEFILES_DIR)/add_gnu_debuglink.make
 158 
 159 #----------------------------------------------------------------------
 160 # fix_empty_sec_hdr_flags tool
 161 include $(MAKEFILES_DIR)/fix_empty_sec_hdr_flags.make
 162 
 163 #----------------------------------------------------------------------
 164 # JVM
 165 
 166 JVM      = jvm
 167 LIBJVM   = lib$(JVM).so
 168 
 169 LIBJVM_DEBUGINFO   = lib$(JVM).debuginfo
 170 LIBJVM_DIZ         = lib$(JVM).diz
 171 
 172 SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt
 173 
 174 SOURCE_PATHS=\
 175   $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
 176       \( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \))
 177 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
 178 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
 179 SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
 180 SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
 181 
 182 CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
 183 CORE_PATHS+=$(GENERATED)/jvmtifiles $(GENERATED)/tracefiles


 282   LIBJVM_MAPFILE$(LDNOMAP) = mapfile_extended
 283   LFLAGS_VM$(LDNOMAP)      += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
 284   LFLAGS_VM                += $(SONAMEFLAG:SONAME=$(LIBJVM))
 285 ifndef USE_GCC
 286   LIBS_VM                  = $(LIBS)
 287 else
 288   # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
 289   # get around library dependency and compatibility issues. Must use gcc not
 290   # g++ to link.
 291   LFLAGS_VM                += $(STATIC_LIBGCC)
 292   LIBS_VM                  += $(STATIC_STDCXX) $(LIBS)
 293 endif
 294 endif
 295 
 296 ifdef USE_GCC
 297 LINK_VM = $(LINK_LIB.CC)
 298 else
 299 LINK_VM = $(LINK_LIB.CXX)
 300 endif
 301 # making the library:
 302 $(LIBJVM): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(LIBJVM.o) $(LIBJVM_MAPFILE)
 303 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
 304         @echo Linking vm...
 305         $(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK)
 306         $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM)
 307         $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK)
 308         $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1
 309 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 310 # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
 311 # Clear the SHF_ALLOC flag (if set) from empty section headers.
 312 # An empty section header has sh_addr == 0 and sh_size == 0.
 313 # This problem has only been seen on Solaris X64, but we call this tool
 314 # on all Solaris builds just in case.
 315         $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@
 316         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
 317 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
 318 # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
 319 #       $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
 320         $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBJVM_DEBUGINFO) $@
 321   ifeq ($(STRIP_POLICY),all_strip)
 322         $(QUIETLY) $(STRIP) $@
 323   else
 324     ifeq ($(STRIP_POLICY),min_strip)
 325         $(QUIETLY) $(STRIP) -x $@
 326     # implied else here is no stripping at all
 327     endif
 328   endif
 329   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 330         $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
 331         $(RM) $(LIBJVM_DEBUGINFO)
 332   endif
 333 endif
 334 endif # filter -sbfast -xsbfast
 335 
 336 
 337 DEST_SUBDIR        = $(JDK_LIBDIR)/$(VM_SUBDIR)
 338 DEST_JVM           = $(DEST_SUBDIR)/$(LIBJVM)
 339 DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO)
 340 DEST_JVM_DIZ       = $(DEST_SUBDIR)/$(LIBJVM_DIZ)


   1 #
   2 # Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #


 136 else
 137 LIBS += -ldl -lthread -lsocket $(LIBM) -lsched -ldoor -ldemangle
 138 endif # 502
 139 endif # 505
 140 else
 141 LIBS += -lsocket -lsched -ldl $(LIBM) -lthread -lc -ldemangle
 142 endif # sparcWorks
 143 
 144 LIBS += -lkstat
 145 
 146 # By default, link the *.o into the library, not the executable.
 147 LINK_INTO$(LINK_INTO) = LIBJVM
 148 
 149 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
 150 
 151 #----------------------------------------------------------------------
 152 # jvm_db & dtrace
 153 include $(MAKEFILES_DIR)/dtrace.make
 154 
 155 #----------------------------------------------------------------------








 156 # JVM
 157 
 158 JVM      = jvm
 159 LIBJVM   = lib$(JVM).so
 160 
 161 LIBJVM_DEBUGINFO   = lib$(JVM).debuginfo
 162 LIBJVM_DIZ         = lib$(JVM).diz
 163 
 164 SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt
 165 
 166 SOURCE_PATHS=\
 167   $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
 168       \( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \))
 169 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
 170 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
 171 SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
 172 SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
 173 
 174 CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
 175 CORE_PATHS+=$(GENERATED)/jvmtifiles $(GENERATED)/tracefiles


 274   LIBJVM_MAPFILE$(LDNOMAP) = mapfile_extended
 275   LFLAGS_VM$(LDNOMAP)      += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
 276   LFLAGS_VM                += $(SONAMEFLAG:SONAME=$(LIBJVM))
 277 ifndef USE_GCC
 278   LIBS_VM                  = $(LIBS)
 279 else
 280   # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
 281   # get around library dependency and compatibility issues. Must use gcc not
 282   # g++ to link.
 283   LFLAGS_VM                += $(STATIC_LIBGCC)
 284   LIBS_VM                  += $(STATIC_STDCXX) $(LIBS)
 285 endif
 286 endif
 287 
 288 ifdef USE_GCC
 289 LINK_VM = $(LINK_LIB.CC)
 290 else
 291 LINK_VM = $(LINK_LIB.CXX)
 292 endif
 293 # making the library:
 294 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE)
 295 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
 296         @echo Linking vm...
 297         $(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK)
 298         $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM)
 299         $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK)
 300         $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1
 301 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)






 302         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
 303         $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@



 304   ifeq ($(STRIP_POLICY),all_strip)
 305         $(QUIETLY) $(STRIP) $@
 306   else
 307     ifeq ($(STRIP_POLICY),min_strip)
 308         $(QUIETLY) $(STRIP) -x $@
 309     # implied else here is no stripping at all
 310     endif
 311   endif
 312   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 313         $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
 314         $(RM) $(LIBJVM_DEBUGINFO)
 315   endif
 316 endif
 317 endif # filter -sbfast -xsbfast
 318 
 319 
 320 DEST_SUBDIR        = $(JDK_LIBDIR)/$(VM_SUBDIR)
 321 DEST_JVM           = $(DEST_SUBDIR)/$(LIBJVM)
 322 DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO)
 323 DEST_JVM_DIZ       = $(DEST_SUBDIR)/$(LIBJVM_DIZ)