make/solaris/makefiles/defs.make

changeset 7354
8c76e844a7f9
parent 4942
f36e073d56a4
child 7535
7ae4e26cb1e0
equal deleted inserted replaced
7353:84e11eeec136 7354:8c76e844a7f9
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.
131 ifneq ($(ALT_OBJCOPY),) 131 ifneq ($(ALT_OBJCOPY),)
132 _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") 132 _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
133 OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) 133 OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
134 endif 134 endif
135 135
136 ifneq ($(OBJCOPY),)
137 # OBJCOPY version check:
138 # - version number is last blank separate word on first line
139 # - version number formats that have been seen:
140 # - <major>.<minor>
141 # - <major>.<minor>.<micro>
142 #
143 # Full Debug Symbols on Solaris needs version 2.21.1 or newer.
144 #
145 OBJCOPY_VERS_CHK := $(shell \
146 $(OBJCOPY) --version \
147 | sed -n \
148 -e 's/.* //' \
149 -e '/^[01]\./b bad' \
150 -e '/^2\./{' \
151 -e ' s/^2\.//' \
152 -e ' /^[0-9]$$/b bad' \
153 -e ' /^[0-9]\./b bad' \
154 -e ' /^1[0-9]$$/b bad' \
155 -e ' /^1[0-9]\./b bad' \
156 -e ' /^20\./b bad' \
157 -e ' /^21\.0$$/b bad' \
158 -e ' /^21\.0\./b bad' \
159 -e '}' \
160 -e ':good' \
161 -e 's/.*/VALID_VERSION/p' \
162 -e 'q' \
163 -e ':bad' \
164 -e 's/.*/BAD_VERSION/p' \
165 -e 'q' \
166 )
167 ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION)
168 _JUNK_ := $(shell \
169 echo >&2 "WARNING: $(OBJCOPY) --version info:"; \
170 $(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \
171 echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \
172 "is needed to create valid .debuginfo files."; \
173 echo >&2 "WARNING: ignoring above objcopy command."; \
174 echo >&2 "WARNING: patch 149063-01 or newer contains the" \
175 "correct Solaris 10 SPARC version."; \
176 echo >&2 "WARNING: patch 149064-01 or newer contains the" \
177 "correct Solaris 10 X86 version."; \
178 echo >&2 "WARNING: Solaris 11 Update 1 contains the" \
179 "correct version."; \
180 )
181 OBJCOPY=
182 endif
183 endif
184
136 ifeq ($(OBJCOPY),) 185 ifeq ($(OBJCOPY),)
137 _JUNK_ := $(shell \ 186 _JUNK_ := $(shell \
138 echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") 187 echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
139 ENABLE_FULL_DEBUG_SYMBOLS=0 188 ENABLE_FULL_DEBUG_SYMBOLS=0
140 _JUNK_ := $(shell \ 189 _JUNK_ := $(shell \

mercurial