294 # DEBUG_SYMBOLS add debug symbols (if configured on) |
294 # DEBUG_SYMBOLS add debug symbols (if configured on) |
295 # CC the compiler to use, default is $(CC) |
295 # CC the compiler to use, default is $(CC) |
296 # LD the linker to use, default is $(LD) |
296 # LD the linker to use, default is $(LD) |
297 # OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST |
297 # OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST |
298 # DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain |
298 # DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain |
|
299 # DISABLED_WARNINGS_C_<toolchain> Disable the given warnings for the specified toolchain |
|
300 # when compiling C code |
|
301 # DISABLED_WARNINGS_CXX_<toolchain> Disable the given warnings for the specified |
|
302 # toolchain when compiling C++ code |
299 # STRIP_SYMBOLS Set to true to strip the final binary if the toolchain allows for it |
303 # STRIP_SYMBOLS Set to true to strip the final binary if the toolchain allows for it |
300 # STRIPFLAGS Optionally change the flags given to the strip command |
304 # STRIPFLAGS Optionally change the flags given to the strip command |
301 SetupNativeCompilation = $(NamedParamsMacroTemplate) |
305 SetupNativeCompilation = $(NamedParamsMacroTemplate) |
302 define SetupNativeCompilationBody |
306 define SetupNativeCompilationBody |
303 |
307 |
537 $1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_STATIC_LIBRARY) |
541 $1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_STATIC_LIBRARY) |
538 endif |
542 endif |
539 |
543 |
540 # Pick up disabled warnings, if possible on this platform. |
544 # Pick up disabled warnings, if possible on this platform. |
541 ifneq ($(DISABLE_WARNING_PREFIX),) |
545 ifneq ($(DISABLE_WARNING_PREFIX),) |
542 $1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE))) |
546 $1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \ |
543 $1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE))) |
547 $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \ |
|
548 $$($1_DISABLED_WARNINGS_C_$(TOOLCHAIN_TYPE))) |
|
549 $1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \ |
|
550 $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \ |
|
551 $$($1_DISABLED_WARNINGS_CXX_$(TOOLCHAIN_TYPE))) |
544 endif |
552 endif |
545 |
553 |
546 # Check if warnings should be considered errors. |
554 # Check if warnings should be considered errors. |
547 # Pick first binary and toolchain specific, then binary specific, then general setting. |
555 # Pick first binary and toolchain specific, then binary specific, then general setting. |
548 ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)),) |
556 ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)),) |