make/solaris/makefiles/defs.make

Print this page


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


 121   ifneq ($(BUILD_FLAVOR),)
 122     ifeq ($(BUILD_FLAVOR), product)
 123       FULL_DEBUG_SYMBOLS ?= 1
 124       ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
 125     else
 126       # debug variants always get Full Debug Symbols (if available)
 127       ENABLE_FULL_DEBUG_SYMBOLS = 1
 128     endif
 129     $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
 130     # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 131 
 132     ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 133       # Default OBJCOPY comes from the SUNWbinutils package:
 134       DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
 135       OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
 136       ifneq ($(ALT_OBJCOPY),)
 137         $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
 138         OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
 139       endif
 140 

















































 141       ifeq ($(OBJCOPY),)
 142         $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files."))
 143         ENABLE_FULL_DEBUG_SYMBOLS=0
 144         $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
 145       else
 146         $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
 147 
 148         # Library stripping policies for .debuginfo configs:
 149         #   all_strip - strips everything from the library
 150         #   min_strip - strips most stuff from the library; leaves minimum symbols
 151         #   no_strip  - does not strip the library at all
 152         #
 153         # Oracle security policy requires "all_strip". A waiver was granted on
 154         # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
 155         #
 156         # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
 157         #
 158         STRIP_POLICY ?= min_strip
 159 
 160         $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))


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


 121   ifneq ($(BUILD_FLAVOR),)
 122     ifeq ($(BUILD_FLAVOR), product)
 123       FULL_DEBUG_SYMBOLS ?= 1
 124       ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
 125     else
 126       # debug variants always get Full Debug Symbols (if available)
 127       ENABLE_FULL_DEBUG_SYMBOLS = 1
 128     endif
 129     $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
 130     # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 131 
 132     ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 133       # Default OBJCOPY comes from the SUNWbinutils package:
 134       DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
 135       OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
 136       ifneq ($(ALT_OBJCOPY),)
 137         $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
 138         OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
 139       endif
 140 
 141       ifneq ($(OBJCOPY),)
 142         # OBJCOPY version check:
 143         # - version number is last blank separate word on first line
 144         # - version number formats that have been seen:
 145         #   - <major>.<minor>
 146         #   - <major>.<minor>.<micro>
 147         #
 148         # Full Debug Symbols on Solaris needs version 2.21.1 or newer.
 149         #
 150         OBJCOPY_VERS_CHK := $(shell \
 151           $(OBJCOPY) --version \
 152             | sed -n \
 153                   -e 's/.* //' \
 154                   -e '/^[01]\./b bad' \
 155                   -e '/^2\./{' \
 156                   -e '  s/^2\.//' \
 157                   -e '  /^[0-9]$$/b bad' \
 158                   -e '  /^[0-9]\./b bad' \
 159                   -e '  /^1[0-9]$$/b bad' \
 160                   -e '  /^1[0-9]\./b bad' \
 161                   -e '  /^20\./b bad' \
 162                   -e '  /^21\.0$$/b bad' \
 163                   -e '  /^21\.0\./b bad' \
 164                   -e '}' \
 165                   -e ':good' \
 166                   -e 's/.*/VALID_VERSION/p' \
 167                   -e 'q' \
 168                   -e ':bad' \
 169                   -e 's/.*/BAD_VERSION/p' \
 170                   -e 'q' \
 171           )
 172         ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION)
 173           _JUNK_ := $(shell \
 174             echo >&2 "WARNING: $(OBJCOPY) --version info:"; \
 175             $(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \
 176             echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \
 177               "is needed to create valid .debuginfo files."; \
 178             echo >&2 "WARNING: ignoring above objcopy command."; \
 179             echo >&2 "WARNING: patch 149063-01 or newer contains the" \
 180               "correct Solaris 10 SPARC version."; \
 181             echo >&2 "WARNING: patch 149064-01 or newer contains the" \
 182               "correct Solaris 10 X86 version."; \
 183             echo >&2 "WARNING: Solaris 11 Update 1 contains the" \
 184               "correct version."; \
 185             )
 186           OBJCOPY=
 187         endif
 188       endif
 189 
 190       ifeq ($(OBJCOPY),)
 191         $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files."))
 192         ENABLE_FULL_DEBUG_SYMBOLS=0
 193         $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
 194       else
 195         $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
 196 
 197         # Library stripping policies for .debuginfo configs:
 198         #   all_strip - strips everything from the library
 199         #   min_strip - strips most stuff from the library; leaves minimum symbols
 200         #   no_strip  - does not strip the library at all
 201         #
 202         # Oracle security policy requires "all_strip". A waiver was granted on
 203         # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
 204         #
 205         # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
 206         #
 207         STRIP_POLICY ?= min_strip
 208 
 209         $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))