make/common/NativeCompilation.gmk
changeset 29304 81a723f8d33c
parent 29173 ad065cf432e9
child 29312 f3f859137ce6
equal deleted inserted replaced
29303:7941167cec3f 29304:81a723f8d33c
   192 #   REORDER reorder file
   192 #   REORDER reorder file
   193 #   DEBUG_SYMBOLS add debug symbols (if configured on)
   193 #   DEBUG_SYMBOLS add debug symbols (if configured on)
   194 #   CC the compiler to use, default is $(CC)
   194 #   CC the compiler to use, default is $(CC)
   195 #   LDEXE the linker to use for linking executables, default is $(LDEXE)
   195 #   LDEXE the linker to use for linking executables, default is $(LDEXE)
   196 #   OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
   196 #   OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
       
   197 #   DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
   197 define SetupNativeCompilation
   198 define SetupNativeCompilation
   198   $(if $(27),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
   199   $(if $(30),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
   199   $(call EvalDebugWrapper,$(strip $1),$(call SetupNativeCompilationInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26)))
   200   $(call EvalDebugWrapper,$(strip $1),$(call SetupNativeCompilationInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26),$(27),$(28),$(29)))
   200 endef
   201 endef
   201 
   202 
   202 define SetupNativeCompilationInner
   203 define SetupNativeCompilationInner
   203   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26, $(if $(strip $($i)),$1_$(strip $($i)))$(NEWLINE))
   204   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29, $(if $(strip $($i)),$1_$(strip $($i)))$(NEWLINE))
   204   $(call LogSetupMacroEntry,SetupNativeCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26))
   205   $(call LogSetupMacroEntry,SetupNativeCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26),$(27),$(28),$(29))
   205   $(if $(27),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
   206   $(if $(30),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
   206 
   207 
   207   ifneq (,$$($1_BIN))
   208   ifneq (,$$($1_BIN))
   208     $$(error BIN has been replaced with OBJECT_DIR)
   209     $$(error BIN has been replaced with OBJECT_DIR)
   209   endif
   210   endif
   210 
   211 
   394     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
   395     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
   395   else
   396   else
   396     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
   397     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
   397     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
   398     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
   398     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
   399     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
       
   400   endif
       
   401 
       
   402   # Pick up disabled warnings, if possible on this platform.
       
   403   ifneq ($(DISABLE_WARNING_PREFIX),)
       
   404     $1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
       
   405     $1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
   399   endif
   406   endif
   400 
   407 
   401   ifeq ($$($1_DEBUG_SYMBOLS), true)
   408   ifeq ($$($1_DEBUG_SYMBOLS), true)
   402     ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
   409     ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
   403       ifdef OPENJDK
   410       ifdef OPENJDK