From 5fe2d3ad004c6d2e260f398d40ae0faa018cc17b Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 25 Apr 2009 19:12:25 +0000 Subject: fix Cortex-M3 build git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1737 42af7a65-404d-4744-a932-0658087f49c3 --- misc/buildroot/toolchain/binutils/2.19.1/400-thumb-cputype.patch | 4 ++++ misc/buildroot/toolchain/gcc/Makefile.in | 5 ++++- misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk | 2 +- misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) (limited to 'misc/buildroot/toolchain') diff --git a/misc/buildroot/toolchain/binutils/2.19.1/400-thumb-cputype.patch b/misc/buildroot/toolchain/binutils/2.19.1/400-thumb-cputype.patch index 61c7315fe..c792d2e38 100644 --- a/misc/buildroot/toolchain/binutils/2.19.1/400-thumb-cputype.patch +++ b/misc/buildroot/toolchain/binutils/2.19.1/400-thumb-cputype.patch @@ -1,3 +1,7 @@ +// This patch is bogus. It does let you create a a version of binutils with the cross +// name of thumb-elf, but it is insufficient to build a whole thumb-elf toolchain because +// of issues with gcc. Rather, build arm-elf, but configure --with-mode=thumb +// diff -u binutils-2.19.1/gas/configure.tgt.orig binutils-2.19.1/gas/configure.tgt --- binutils-2.19.1/gas/configure.tgt.orig 2009-04-25 11:00:15.593750000 -0400 +++ binutils-2.19.1/gas/configure.tgt 2009-04-25 11:00:45.593750000 -0400 diff --git a/misc/buildroot/toolchain/gcc/Makefile.in b/misc/buildroot/toolchain/gcc/Makefile.in index 895f345d7..aaec774dc 100644 --- a/misc/buildroot/toolchain/gcc/Makefile.in +++ b/misc/buildroot/toolchain/gcc/Makefile.in @@ -44,7 +44,7 @@ TARGET_SOFT_FLOAT:= ARCH_FPU_SUFFIX:= endif -# some additional defaults +# some additional tuning values ifneq ($(strip $(subst ",,$(BR2_GCC_TARGET_ARCH))),) # "))) GCC_WITH_ARCH:=--with-arch=$(BR2_GCC_TARGET_ARCH) @@ -57,3 +57,6 @@ ifneq ($(strip $(subst ",,$(BR2_GCC_TARGET_ABI))),) # "))) GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI) endif +ifdef BR2_cortex_m3 +GCC_WITH_MODE:=--with-mode=thumb +endif diff --git a/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk b/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk index 2214cfda2..3b745c153 100644 --- a/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk +++ b/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk @@ -123,7 +123,7 @@ $(GCC_BUILD_DIR)/.configured: $(GCC_DIR)/.patched $(GCC_STAGING_PREREQ) $(THREADS) \ $(MULTILIB) \ $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \ + $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_MODE) \ $(GCC_USE_SJLJ_EXCEPTIONS) \ $(DISABLE_LARGEFILE) \ $(EXTRA_GCC_CONFIG_OPTIONS)); diff --git a/misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk b/misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk index 41c0590ef..1a2dbcb3f 100644 --- a/misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk +++ b/misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk @@ -121,7 +121,7 @@ $(GCC_BUILD_DIR)/.configured: $(GCC_DIR)/.patched $(GCC_STAGING_PREREQ) $(THREADS) \ $(MULTILIB) \ $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \ + $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_MODE) \ $(GCC_USE_SJLJ_EXCEPTIONS) \ $(DISABLE_LARGEFILE) \ $(EXTRA_GCC_CONFIG_OPTIONS)); -- cgit v1.2.3