hotspot/make/solaris/makefiles/defs.make
changeset 27657 f4fcaa1bb2d4
parent 26691 40ea2c41f53b
child 30113 3f6beb804b02
equal deleted inserted replaced
27656:edf22ab2020b 27657:f4fcaa1bb2d4
     1 #
     1 #
     2 # Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
     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.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     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
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.
     7 # published by the Free Software Foundation.
   136       ifneq ($(ALT_OBJCOPY),)
   136       ifneq ($(ALT_OBJCOPY),)
   137         $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
   137         $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
   138         OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
   138         OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
   139       endif
   139       endif
   140 
   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 
   141       ifeq ($(OBJCOPY),)
   190       ifeq ($(OBJCOPY),)
   142         $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files."))
   191         $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files."))
   143         ENABLE_FULL_DEBUG_SYMBOLS=0
   192         ENABLE_FULL_DEBUG_SYMBOLS=0
   144         $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
   193         $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
   145       else
   194       else