diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2010-12-26 16:04:45 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2010-12-26 16:04:45 +0100 |
commit | da4852176bdec12cc8d40885feeb72c514eb51f1 (patch) | |
tree | cbe81b033d04037dea698f4a59bafde5dd3e6139 /mk | |
parent | 86adad13d3574d4e059c960abb41c6987e455cdb (diff) | |
download | embtoolkit-da4852176bdec12cc8d40885feeb72c514eb51f1.tar.gz embtoolkit-da4852176bdec12cc8d40885feeb72c514eb51f1.tar.bz2 embtoolkit-da4852176bdec12cc8d40885feeb72c514eb51f1.tar.xz |
Toolchain/Build system: set -mcpu, -march and floating point switches in target cflags
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/arm-arch.mk | 6 | ||||
-rw-r--r-- | mk/eglibc.mk | 3 | ||||
-rw-r--r-- | mk/mips-arch.mk | 9 | ||||
-rw-r--r-- | mk/toolchain.mk | 4 |
4 files changed, 16 insertions, 6 deletions
diff --git a/mk/arm-arch.mk b/mk/arm-arch.mk index 55f6e05..c39e34b 100644 --- a/mk/arm-arch.mk +++ b/mk/arm-arch.mk @@ -1,6 +1,6 @@ ################################################################################ # Embtoolkit -# Copyright(C) 2009 Abdoulaye Walsimou GAYE. All rights reserved. +# Copyright(C) 2009-2010 Abdoulaye Walsimou GAYE. All rights reserved. # # This program is free software; you can distribute it and/or modify it # under the terms of the GNU General Public License @@ -25,7 +25,6 @@ LINUX_ARCH := arm GNU_TARGET_ARCH := arm EMBTK_MCU_FLAG := $(subst ",,$(strip $(CONFIG_EMBTK_ARM_MCU_STRING))) -TARGET_CFLAGS := ifeq ($(CONFIG_EMBTK_CLIB_EGLIBC),y) #EGLIBC C library @@ -71,3 +70,6 @@ else EMBTK_TARGET_FLOAT_CFLAGS := -mfloat-abi=hard endif +# Some other flags for TARGET_CFLAGS +EMBTK_TARGET_MCPU := -mcpu=$(EMBTK_MCU_FLAG) +EMBTK_TARGET_MARCH := diff --git a/mk/eglibc.mk b/mk/eglibc.mk index 2c61bee..0d3d35a 100644 --- a/mk/eglibc.mk +++ b/mk/eglibc.mk @@ -103,8 +103,7 @@ endif $(EGLIBC_HEADERS_BUILD_DIR)/.configured: $(call EMBTK_CONFIGURE_MSG,eglibc-$(EGLIBC_VERSION)) cd $(EGLIBC_HEADERS_BUILD_DIR); BUILD_CC=$(HOSTCC_CACHED) \ - CFLAGS="$(EMBTK_TARGET_ABI) $(EMBTK_TARGET_FLOAT_CFLAGS) \ - $(TARGET_CFLAGS) -pipe" \ + CFLAGS="$(TARGET_CFLAGS) -pipe" \ CC=$(TOOLS)/bin/$(STRICT_GNU_TARGET)-gcc \ CXX=$(TOOLS)/bin/$(STRICT_GNU_TARGET)-g++ \ AR=$(TOOLS)/bin/$(STRICT_GNU_TARGET)-ar \ diff --git a/mk/mips-arch.mk b/mk/mips-arch.mk index f77f0e6..91c4cba 100644 --- a/mk/mips-arch.mk +++ b/mk/mips-arch.mk @@ -1,6 +1,6 @@ ################################################################################ # Embtoolkit -# Copyright(C) 2009 Abdoulaye Walsimou GAYE. All rights reserved. +# Copyright(C) 2009-2010 Abdoulaye Walsimou GAYE. All rights reserved. # # This program is free software; you can distribute it and/or modify it # under the terms of the GNU General Public License @@ -209,7 +209,6 @@ endif endif EMBTK_MCU_FLAG := $(GNU_TARGET_ARCH) -TARGET_CFLAGS := #GCC configure options GCC_WITH_ARCH := --with-arch=$(GNU_TARGET_ARCH) @@ -218,9 +217,12 @@ export GCC_WITH_ARCH #Hard or soft floating point for GCC? ifeq ($(CONFIG_EMBTK_HARDFLOAT),y) GCC_WITH_FLOAT := --with-float=hard +EMBTK_TARGET_FLOAT_CFLAGS := -mhard-float else GCC_WITH_FLOAT := --with-float=soft +EMBTK_TARGET_FLOAT_CFLAGS := -msoft-float endif +export GCC_WITH_FLOAT EMBTK_TARGET_FLOAT_CFLAGS ifeq ($(CONFIG_EMBTK_ARCH_MIPS_ABI_O32),y) GCC_WITH_ABI := --with-abi=32 @@ -248,3 +250,6 @@ EMBTK_TARGET_ABI := -mabi=64 export GCC_WITH_ABI EMBTK_TARGET_ABI endif +# Some other flags for TARGET_CFLAGS +EMBTK_TARGET_MCPU := +EMBTK_TARGET_MARCH := -march=$(EMBTK_MCU_FLAG) diff --git a/mk/toolchain.mk b/mk/toolchain.mk index 1bea1a0..a6a3783 100644 --- a/mk/toolchain.mk +++ b/mk/toolchain.mk @@ -32,6 +32,10 @@ TARGETNM := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-nm TARGETSTRIP := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-strip TARGETOBJDUMP := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-objdump TARGETOBJCOPY := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-objcopy +TARGET_CFLAGS := $(EMBTK_TARGET_MCPU) +TARGET_CFLAGS += $(EMBTK_TARGET_MARCH) +TARGET_CFLAGS += $(EMBTK_TARGET_ABI) +TARGET_CFLAGS += $(EMBTK_TARGET_FLOAT_CFLAGS) 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,) |