From 853c865eef540b1c6ebd3db7e9e22a98d7e475e7 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Wed, 20 Oct 2010 22:44:26 +0200 Subject: Toolchain: improve target builmd options This patch improves target build options by putting them in their dedicated .kconfig file and gives ability to choose which optimization to use for libraries and binaries. Signed-off-by: Abdoulaye Walsimou Gaye --- mk/toolchain.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mk') diff --git a/mk/toolchain.mk b/mk/toolchain.mk index 79eba33..d7fcec8 100644 --- a/mk/toolchain.mk +++ b/mk/toolchain.mk @@ -1,5 +1,5 @@ ################################################################################ -# Abdoulaye Walsimou GAYE, +# Abdoulaye Walsimou GAYE # Copyright(C) 2009-2010 Abdoulaye Walsimou GAYE. All rights reserved. # # This program is free software: you can redistribute it and/or modify @@ -19,7 +19,7 @@ # # \file toolchain.mk # \brief toolchain.mk of Embtoolkit -# \author Abdoulaye Walsimou GAYE, +# \author Abdoulaye Walsimou GAYE # \date May 2009 ################################################################################ @@ -33,6 +33,9 @@ TARGETSTRIP := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-strip TARGETOBJDUMP := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-objdump TARGETOBJCOPY := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-objcopy TARGET_CFLAGS += $(subst ",,$(strip $(CONFIG_EMBTK_TARGET_COMPILER_CFLAGS))) +TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_SIZE_OPTIMIZED),-Os,) +TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_SPEED_OPTIMIZED),-O3,) +TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_WITH_DEBUG_DATA),-g,) CROSS_COMPILE := $(TOOLS)/bin/$(STRICT_GNU_TARGET)- export TARGETCC TARGETCXX TARGETAR TARGETRANLIB TARGETLD TARGETNM -- cgit v1.2.3