< prev index next >

make/linux/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 #


 327 # our build platform (AS-2.1).
 328 LD_SCRIPT = libjvm.so.lds
 329 $(LD_SCRIPT): $(LIBJVM_MAPFILE)
 330         $(QUIETLY) {                                                \
 331           rm -rf $@;                                                \
 332           $(LINK_VM) -Wl,--verbose $(LFLAGS_VM) 2>&1             |  \
 333             sed -e '/^======/,/^======/!d'                          \
 334                 -e '/^======/d'                                     \
 335                 -e 's/0\( + SIZEOF_HEADERS\)/$(JVM_BASE_ADDR)\1/'   \
 336                 > $@;                                               \
 337         }
 338 LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT)
 339 endif
 340 
 341 # With more recent Redhat releases (or the cutting edge version Fedora), if
 342 # SELinux is configured to be enabled, the runtime linker will fail to apply
 343 # the text relocation to libjvm.so considering that it is built as a non-PIC
 344 # DSO. To workaround that, we run chcon to libjvm.so after it is built. See
 345 # details in bug 6538311.
 346 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
 347         $(QUIETLY) {                                                    \
 348             echo $(LOG_INFO) Linking vm...;                             \
 349             $(LINK_LIB.CXX/PRE_HOOK)                                     \
 350             $(LINK_VM) $(LD_SCRIPT_FLAG)                                \
 351                        $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM);       \
 352             $(LINK_LIB.CXX/POST_HOOK)                                    \
 353             rm -f $@.1; ln -s $@ $@.1;                                  \
 354             if [ \"$(CROSS_COMPILE_ARCH)\" = \"\" ] ; then                    \
 355               if [ -x /usr/sbin/selinuxenabled ] ; then                 \
 356                 if /usr/sbin/selinuxenabled; then                       \
 357                   if ! /usr/bin/chcon -t textrel_shlib_t $@; then       \
 358                     echo "ERROR: Cannot chcon $@";                      \
 359                   fi                                                    \
 360                 fi                                                      \
 361               fi                                                        \
 362             fi                                                          \
 363         }
 364 
 365 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 366         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
 367         $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
 368   ifeq ($(STRIP_POLICY),all_strip)
 369         $(QUIETLY) $(STRIP) $@
 370   else
 371     ifeq ($(STRIP_POLICY),min_strip)
 372         $(QUIETLY) $(STRIP) -g $@
 373     # implied else here is no stripping at all
 374     endif
 375   endif
 376   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 377         $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
 378         $(RM) $(LIBJVM_DEBUGINFO)
 379   endif
 380 endif
 381 
 382 DEST_SUBDIR        = $(JDK_LIBDIR)/$(VM_SUBDIR)


   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 #


 327 # our build platform (AS-2.1).
 328 LD_SCRIPT = libjvm.so.lds
 329 $(LD_SCRIPT): $(LIBJVM_MAPFILE)
 330         $(QUIETLY) {                                                \
 331           rm -rf $@;                                                \
 332           $(LINK_VM) -Wl,--verbose $(LFLAGS_VM) 2>&1             |  \
 333             sed -e '/^======/,/^======/!d'                          \
 334                 -e '/^======/d'                                     \
 335                 -e 's/0\( + SIZEOF_HEADERS\)/$(JVM_BASE_ADDR)\1/'   \
 336                 > $@;                                               \
 337         }
 338 LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT)
 339 endif
 340 
 341 # With more recent Redhat releases (or the cutting edge version Fedora), if
 342 # SELinux is configured to be enabled, the runtime linker will fail to apply
 343 # the text relocation to libjvm.so considering that it is built as a non-PIC
 344 # DSO. To workaround that, we run chcon to libjvm.so after it is built. See
 345 # details in bug 6538311.
 346 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
 347         $(QUIETLY) {                                                        \
 348             echo $(LOG_INFO) Linking vm...;                                 \
 349             $(LINK_LIB.CXX/PRE_HOOK)                                        \
 350             $(LINK_VM) $(LD_SCRIPT_FLAG)                                    \
 351                        $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM);   \
 352             $(LINK_LIB.CXX/POST_HOOK)                                       \
 353             rm -f $@.1; ln -s $@ $@.1;                                      \
 354             if [ \"$(CROSS_COMPILE_ARCH)\" = \"\" ] ; then                  \
 355               if [ -x /usr/sbin/selinuxenabled ] ; then                     \
 356                 if /usr/sbin/selinuxenabled; then                           \
 357                   if ! /usr/bin/chcon -t textrel_shlib_t $@; then           \
 358                     echo "ERROR: Cannot chcon $@";                          \
 359                   fi                                                        \
 360                 fi                                                          \
 361               fi                                                            \
 362             fi                                                              \
 363         }
 364 
 365 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 366         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
 367         $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
 368   ifeq ($(STRIP_POLICY),all_strip)
 369         $(QUIETLY) $(STRIP) $@
 370   else
 371     ifeq ($(STRIP_POLICY),min_strip)
 372         $(QUIETLY) $(STRIP) -g $@
 373     # implied else here is no stripping at all
 374     endif
 375   endif
 376   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 377         $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
 378         $(RM) $(LIBJVM_DEBUGINFO)
 379   endif
 380 endif
 381 
 382 DEST_SUBDIR        = $(JDK_LIBDIR)/$(VM_SUBDIR)


< prev index next >