1 #
2 # Copyright (c) 2013, 2017, 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. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
253 endif
254 endif
255
256 # AIX warning explanation:
257 # 1500-010 : (W) WARNING in ...: Infinite loop. Program may not stop.
258 # There are several infinite loops in the vm, so better suppress.
259 # 1540-0198 : (W) The omitted keyword "private" is assumed for base class "...".
260 # 1540-0216 : (W) An expression of type .. cannot be converted to type ..
261 # In hotspot this fires for functionpointer to pointer conversions
262 # 1540-1088 : (W) The exception specification is being ignored.
263 # In hotspot this is caused by throw() in declaration of new() in nmethod.hpp.
264 # 1540-1090 : (I) The destructor of "..." might not be called.
265 # 1540-1639 : (I) The behavior of long type bit fields has changed ...
266
267 # Include mapfile generation. It relies on BUILD_LIBJVM_ALL_OBJS which is only
268 # defined after the above call to BUILD_LIBJVM. Mapfile will be generated
269 # after all object files are built, but before the jvm library is linked.
270 include lib/JvmMapfile.gmk
271
272 TARGETS += $(BUILD_LIBJVM)
|
1 #
2 # Copyright (c) 2013, 2018, 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. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
253 endif
254 endif
255
256 # AIX warning explanation:
257 # 1500-010 : (W) WARNING in ...: Infinite loop. Program may not stop.
258 # There are several infinite loops in the vm, so better suppress.
259 # 1540-0198 : (W) The omitted keyword "private" is assumed for base class "...".
260 # 1540-0216 : (W) An expression of type .. cannot be converted to type ..
261 # In hotspot this fires for functionpointer to pointer conversions
262 # 1540-1088 : (W) The exception specification is being ignored.
263 # In hotspot this is caused by throw() in declaration of new() in nmethod.hpp.
264 # 1540-1090 : (I) The destructor of "..." might not be called.
265 # 1540-1639 : (I) The behavior of long type bit fields has changed ...
266
267 # Include mapfile generation. It relies on BUILD_LIBJVM_ALL_OBJS which is only
268 # defined after the above call to BUILD_LIBJVM. Mapfile will be generated
269 # after all object files are built, but before the jvm library is linked.
270 include lib/JvmMapfile.gmk
271
272 TARGETS += $(BUILD_LIBJVM)
273
274 ################################################################################
275 # Hotspot disallows the use of global operators 'new' and 'delete'. This build
276 # time check helps enforce this requirement. If you trigger this check and the
277 # reference is not obvious from the source, GNU objdump can be used to help find
278 # the reference:
279 #
280 # objdump -lrdSC <path/to/file.o>
281 #
282 # -C demangle
283 # -d disassemble
284 # -r print relocation entries, interspersed with the disassembly
285 # -S print source code, intermixed with disassembly
286 # -l include filenames and line numbers
287 #
288 # Search the output for the operator(s) of interest, to see where they are
289 # referenced.
290
291 ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
292
293 OP_REGEXP := \*UND\*.*[^:]operator (new|delete)
294
295 define SetupOperatorNewDeleteCheck
296 $1.op_check: $1
297 if [ -n "`$(OBJDUMP) -t $$< | $(CXXFILT) | $(EGREP) '$(OP_REGEXP)'`" ]; then \
298 $(ECHO) "$$<: Error: Use of global operators new and delete is not allowed in Hotspot:"; \
299 $(OBJDUMP) -t $$< | $(CXXFILT) | $(EGREP) '$(OP_REGEXP)'; \
300 $(ECHO) "See: $(TOPDIR)/make/hotspot/lib/CompileJvm.gmk"; \
301 exit 1; \
302 fi
303 $(TOUCH) $$@
304
305 TARGETS += $1.op_check
306 endef
307
308 $(foreach o, $(BUILD_LIBJVM_ALL_OBJS), $(eval $(call SetupOperatorNewDeleteCheck,$o)))
309 endif
|