diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2010-10-20 22:44:26 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2010-10-20 22:44:26 +0200 |
commit | 853c865eef540b1c6ebd3db7e9e22a98d7e475e7 (patch) | |
tree | 4c0a7e356d9994f8a086998d525d85bfd4e734d0 /mk | |
parent | f0d8ae73ca1a2df83d8983d3aa1e7fe0798db575 (diff) | |
download | embtoolkit-853c865eef540b1c6ebd3db7e9e22a98d7e475e7.tar.gz embtoolkit-853c865eef540b1c6ebd3db7e9e22a98d7e475e7.tar.bz2 embtoolkit-853c865eef540b1c6ebd3db7e9e22a98d7e475e7.tar.xz |
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 <awg@embtoolkit.org>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/toolchain.mk | 7 |
1 files changed, 5 insertions, 2 deletions
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, <awg@embtoolkit.org> +# Abdoulaye Walsimou GAYE <awg@embtoolkit.org> # 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, <awg@embtoolkit.org> +# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org> # \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 |