< prev index next >

hotspot/make/bsd/makefiles/vm.make

Print this page


   1 #
   2 # Copyright (c) 1999, 2015, 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 #


 111 CFLAGS += $(CFLAGS_WARN/BYFILE)
 112 
 113 # Do not use C++ exception handling
 114 CFLAGS += $(CFLAGS/NOEX)
 115 
 116 # Extra flags from gnumake's invocation or environment
 117 CFLAGS += $(EXTRA_CFLAGS)
 118 LFLAGS += $(EXTRA_CFLAGS)
 119 
 120 # Don't set excutable bit on stack segment
 121 # the same could be done by separate execstack command
 122 # Darwin is non-executable-stack by default
 123 ifneq ($(OS_VENDOR), Darwin)
 124 LFLAGS += -Xlinker -z -Xlinker noexecstack
 125 endif
 126 
 127 LIBS += -lm
 128 
 129 ifeq ($(USE_CLANG),)
 130   LIBS += -pthread











 131 endif
 132 
 133 # By default, link the *.o into the library, not the executable.
 134 LINK_INTO$(LINK_INTO) = LIBJVM
 135 
 136 JDK_LIBDIR = $(JAVA_HOME)/lib/$(LIBARCH)
 137 
 138 #----------------------------------------------------------------------
 139 # jvm_db & dtrace
 140 include $(MAKEFILES_DIR)/dtrace.make
 141 
 142 #----------------------------------------------------------------------
 143 # JVM
 144 
 145 JVM    = jvm
 146 ifeq ($(OS_VENDOR), Darwin)
 147   LIBJVM   = lib$(JVM).$(LIBRARY_SUFFIX)
 148   CFLAGS  += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
 149 
 150   LIBJVM_DEBUGINFO   = lib$(JVM).$(LIBRARY_SUFFIX).dSYM


 289 
 290 STATIC_CXX = false
 291 
 292 ifeq ($(LINK_INTO),AOUT)
 293   LIBJVM.o                 =
 294   LIBJVM_MAPFILE           =
 295   LIBS_VM                  = $(LIBS)
 296 else
 297   LIBJVM.o                 = $(JVM_OBJ_FILES)
 298   LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
 299   LFLAGS_VM$(LDNOMAP)      += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
 300   LFLAGS_VM                += $(SONAMEFLAG:SONAME=$(LIBJVM))
 301 
 302   ifeq ($(OS_VENDOR), Darwin)
 303     ifneq ($(STATIC_BUILD),true)
 304     LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.
 305     LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/..
 306     LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F)
 307     endif
 308   else


 309     LFLAGS_VM                += -Wl,-z,defs

 310   endif
 311 
 312   # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
 313   # get around library dependency and compatibility issues. Must use gcc not
 314   # g++ to link.
 315   ifeq ($(STATIC_CXX), true)
 316     LFLAGS_VM              += $(STATIC_LIBGCC)
 317     LIBS_VM                += $(STATIC_STDCXX)
 318     LINK_VM                = $(LINK_LIB.CC)
 319   else
 320     LINK_VM                = $(LINK_LIB.CXX)
 321   endif
 322 
 323   LIBS_VM                  += $(LIBS)
 324 endif
 325 ifeq ($(JVM_VARIANT_ZERO), true)
 326   LIBS_VM += $(LIBFFI_LIBS)
 327 endif
 328 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
 329   LIBS_VM   += $(LIBFFI_LIBS) $(LLVM_LIBS)


   1 #
   2 # Copyright (c) 1999, 2016, 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 #


 111 CFLAGS += $(CFLAGS_WARN/BYFILE)
 112 
 113 # Do not use C++ exception handling
 114 CFLAGS += $(CFLAGS/NOEX)
 115 
 116 # Extra flags from gnumake's invocation or environment
 117 CFLAGS += $(EXTRA_CFLAGS)
 118 LFLAGS += $(EXTRA_CFLAGS)
 119 
 120 # Don't set excutable bit on stack segment
 121 # the same could be done by separate execstack command
 122 # Darwin is non-executable-stack by default
 123 ifneq ($(OS_VENDOR), Darwin)
 124 LFLAGS += -Xlinker -z -Xlinker noexecstack
 125 endif
 126 
 127 LIBS += -lm
 128 
 129 ifeq ($(USE_CLANG),)
 130   LIBS += -pthread
 131 else
 132   # For non-Darwin BSD we also want pthread even with clang.
 133   ifneq ($(OS_VENDOR), Darwin)
 134     LIBS += -pthread
 135   endif
 136 endif
 137 
 138 ifeq ($(USE_CLANG), true)
 139   ifeq ($(OS_VENDOR), OpenBSD)
 140     LIBS += -lc
 141   endif
 142 endif
 143 
 144 # By default, link the *.o into the library, not the executable.
 145 LINK_INTO$(LINK_INTO) = LIBJVM
 146 
 147 JDK_LIBDIR = $(JAVA_HOME)/lib/$(LIBARCH)
 148 
 149 #----------------------------------------------------------------------
 150 # jvm_db & dtrace
 151 include $(MAKEFILES_DIR)/dtrace.make
 152 
 153 #----------------------------------------------------------------------
 154 # JVM
 155 
 156 JVM    = jvm
 157 ifeq ($(OS_VENDOR), Darwin)
 158   LIBJVM   = lib$(JVM).$(LIBRARY_SUFFIX)
 159   CFLAGS  += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
 160 
 161   LIBJVM_DEBUGINFO   = lib$(JVM).$(LIBRARY_SUFFIX).dSYM


 300 
 301 STATIC_CXX = false
 302 
 303 ifeq ($(LINK_INTO),AOUT)
 304   LIBJVM.o                 =
 305   LIBJVM_MAPFILE           =
 306   LIBS_VM                  = $(LIBS)
 307 else
 308   LIBJVM.o                 = $(JVM_OBJ_FILES)
 309   LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
 310   LFLAGS_VM$(LDNOMAP)      += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
 311   LFLAGS_VM                += $(SONAMEFLAG:SONAME=$(LIBJVM))
 312 
 313   ifeq ($(OS_VENDOR), Darwin)
 314     ifneq ($(STATIC_BUILD),true)
 315     LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.
 316     LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/..
 317     LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F)
 318     endif
 319   else
 320     # On FreeBSD/OpenBSD "environ" is intentionally undefined, so we can't use -z defs.
 321     ifeq ($(filter $(OS_VENDOR), FreeBSD OpenBSD), )
 322       LFLAGS_VM                += -Wl,-z,defs
 323     endif
 324   endif
 325 
 326   # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
 327   # get around library dependency and compatibility issues. Must use gcc not
 328   # g++ to link.
 329   ifeq ($(STATIC_CXX), true)
 330     LFLAGS_VM              += $(STATIC_LIBGCC)
 331     LIBS_VM                += $(STATIC_STDCXX)
 332     LINK_VM                = $(LINK_LIB.CC)
 333   else
 334     LINK_VM                = $(LINK_LIB.CXX)
 335   endif
 336 
 337   LIBS_VM                  += $(LIBS)
 338 endif
 339 ifeq ($(JVM_VARIANT_ZERO), true)
 340   LIBS_VM += $(LIBFFI_LIBS)
 341 endif
 342 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
 343   LIBS_VM   += $(LIBFFI_LIBS) $(LLVM_LIBS)


< prev index next >