hotspot/make/aix/makefiles/defs.make
changeset 33957 39113ae98993
parent 30113 3f6beb804b02
child 34319 9d6dd3c5ca23
equal deleted inserted replaced
30850:56166ce66037 33957:39113ae98993
     1 #
     1 #
     2 # Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
     2 # Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
     3 # Copyright 2012, 2013 SAP AG. All rights reserved.
     3 # Copyright 2012, 2013 SAP AG. All rights reserved.
     4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5 #
     5 #
     6 # This code is free software; you can redistribute it and/or modify it
     6 # This code is free software; you can redistribute it and/or modify it
     7 # under the terms of the GNU General Public License version 2 only, as
     7 # under the terms of the GNU General Public License version 2 only, as
    77     JVM_VARIANTS:=server
    77     JVM_VARIANTS:=server
    78     JVM_VARIANT_SERVER:=true
    78     JVM_VARIANT_SERVER:=true
    79   endif
    79   endif
    80 endif
    80 endif
    81 
    81 
    82 # determine if HotSpot is being built in JDK6 or earlier version
    82 # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
    83 JDK6_OR_EARLIER=0
    83 # builds is enabled with debug info files ZIP'ed to save space. For
    84 ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
    84 # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
    85   # if the longer variable names (newer build style) are set, then check those
    85 # debug build without debug info isn't very useful.
    86   ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
    86 # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
    87     JDK6_OR_EARLIER=1
    87 #
       
    88 # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
       
    89 # disabled for a BUILD_FLAVOR == product build.
       
    90 #
       
    91 # Note: Use of a different variable name for the FDS override option
       
    92 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
       
    93 # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
       
    94 # in options via environment variables, use of distinct variables
       
    95 # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
       
    96 # product build, the FULL_DEBUG_SYMBOLS environment variable will be
       
    97 # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
       
    98 # the same variable name is used, then different values can be picked
       
    99 # up by different parts of the build. Just to be clear, we only need
       
   100 # two variable names because the incoming option value can be
       
   101 # overridden in some situations, e.g., a BUILD_FLAVOR != product
       
   102 # build.
       
   103 
       
   104 # Due to the multiple sub-make processes that occur this logic gets
       
   105 # executed multiple times. We reduce the noise by at least checking that
       
   106 # BUILD_FLAVOR has been set.
       
   107 ifneq ($(BUILD_FLAVOR),)
       
   108   ifeq ($(BUILD_FLAVOR), product)
       
   109     FULL_DEBUG_SYMBOLS ?= 1
       
   110     ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
       
   111   else
       
   112     # debug variants always get Full Debug Symbols (if available)
       
   113     ENABLE_FULL_DEBUG_SYMBOLS = 1
    88   endif
   114   endif
    89 else
   115   $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
    90   # the longer variables aren't set so check the shorter variable names
   116   # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
    91   ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
   117 
    92     JDK6_OR_EARLIER=1
   118   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
    93   endif
   119     # Default OBJCOPY comes from GNU Binutils on Linux
    94 endif
   120     ifeq ($(CROSS_COMPILE_ARCH),)
    95 
   121       DEF_OBJCOPY=/usr/bin/objcopy
    96 ifeq ($(JDK6_OR_EARLIER),0)
       
    97   # Full Debug Symbols is supported on JDK7 or newer.
       
    98   # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
       
    99   # builds is enabled with debug info files ZIP'ed to save space. For
       
   100   # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
       
   101   # debug build without debug info isn't very useful.
       
   102   # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
       
   103   #
       
   104   # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
       
   105   # disabled for a BUILD_FLAVOR == product build.
       
   106   #
       
   107   # Note: Use of a different variable name for the FDS override option
       
   108   # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
       
   109   # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
       
   110   # in options via environment variables, use of distinct variables
       
   111   # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
       
   112   # product build, the FULL_DEBUG_SYMBOLS environment variable will be
       
   113   # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
       
   114   # the same variable name is used, then different values can be picked
       
   115   # up by different parts of the build. Just to be clear, we only need
       
   116   # two variable names because the incoming option value can be
       
   117   # overridden in some situations, e.g., a BUILD_FLAVOR != product
       
   118   # build.
       
   119 
       
   120   # Due to the multiple sub-make processes that occur this logic gets
       
   121   # executed multiple times. We reduce the noise by at least checking that
       
   122   # BUILD_FLAVOR has been set.
       
   123   ifneq ($(BUILD_FLAVOR),)
       
   124     ifeq ($(BUILD_FLAVOR), product)
       
   125       FULL_DEBUG_SYMBOLS ?= 1
       
   126       ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
       
   127     else
   122     else
   128       # debug variants always get Full Debug Symbols (if available)
   123       # Assume objcopy is part of the cross-compilation toolset
   129       ENABLE_FULL_DEBUG_SYMBOLS = 1
   124       ifneq ($(ALT_COMPILER_PATH),)
       
   125         DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
       
   126       endif
   130     endif
   127     endif
   131     $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
   128     OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
   132     # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
   129     ifneq ($(ALT_OBJCOPY),)
   133 
   130       $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
   134     ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
   131       OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
   135       # Default OBJCOPY comes from GNU Binutils on Linux
   132     endif
   136       ifeq ($(CROSS_COMPILE_ARCH),)
   133 
   137         DEF_OBJCOPY=/usr/bin/objcopy
   134     ifeq ($(OBJCOPY),)
   138       else
   135       $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY."))
   139         # Assume objcopy is part of the cross-compilation toolset
   136       ENABLE_FULL_DEBUG_SYMBOLS=0
   140         ifneq ($(ALT_COMPILER_PATH),)
   137       $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
   141           DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
   138     else
   142         endif
   139       $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
   143       endif
   140 
   144       OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
   141       # Library stripping policies for .debuginfo configs:
   145       ifneq ($(ALT_OBJCOPY),)
   142       #   all_strip - strips everything from the library
   146         $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
   143       #   min_strip - strips most stuff from the library; leaves minimum symbols
   147         OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
   144       #   no_strip  - does not strip the library at all
   148       endif
   145       #
   149 
   146       # Oracle security policy requires "all_strip". A waiver was granted on
   150       ifeq ($(OBJCOPY),)
   147       # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
   151         $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY."))
   148       #
   152         ENABLE_FULL_DEBUG_SYMBOLS=0
   149       # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
   153         $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
   150       #
   154       else
   151       STRIP_POLICY ?= min_strip
   155         $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
   152 
   156 
   153       $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
   157         # Library stripping policies for .debuginfo configs:
   154 
   158         #   all_strip - strips everything from the library
   155       ZIP_DEBUGINFO_FILES ?= 1
   159         #   min_strip - strips most stuff from the library; leaves minimum symbols
   156 
   160         #   no_strip  - does not strip the library at all
   157       $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
   161         #
   158     endif
   162         # Oracle security policy requires "all_strip". A waiver was granted on
   159   endif # ENABLE_FULL_DEBUG_SYMBOLS=1
   163         # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
   160 endif # BUILD_FLAVOR
   164         #
       
   165         # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
       
   166         #
       
   167         STRIP_POLICY ?= min_strip
       
   168 
       
   169         $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
       
   170 
       
   171         ZIP_DEBUGINFO_FILES ?= 1
       
   172 
       
   173         $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
       
   174       endif
       
   175     endif # ENABLE_FULL_DEBUG_SYMBOLS=1
       
   176   endif # BUILD_FLAVOR
       
   177 endif # JDK_6_OR_EARLIER
       
   178 
   161 
   179 # unused JDK_INCLUDE_SUBDIR=aix
   162 # unused JDK_INCLUDE_SUBDIR=aix
   180 
   163 
   181 # Library suffix
   164 # Library suffix
   182 LIBRARY_SUFFIX=so
   165 LIBRARY_SUFFIX=so