瀏覽代碼

use thumb mode for cortex-m3 by default.

Fix error: r7 cannot be used in asm here by using -fomit-frame-pointer.
Waldemar Brodkorb 10 年之前
父節點
當前提交
ffffb0121d
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      toolchain/gcc/Makefile

+ 5 - 5
toolchain/gcc/Makefile

@@ -135,7 +135,7 @@ GCC_CONFOPTS+=		--with-cpu=arm1176jzf-s
 endif
 
 ifeq ($(ADK_CPU_CORTEX_M3),y)
-GCC_CONFOPTS+=		--with-cpu=cortex-m3
+GCC_CONFOPTS+=		--with-cpu=cortex-m3 --with-mode=thumb
 endif
 
 ifeq ($(ADK_CPU_CORTEX_A9),y)
@@ -194,8 +194,8 @@ endif
 	$(SED) '/k prot/agcc_cv_libc_provides_ssp=yes' $(WRKBUILD)/gcc/configure
 	cd $(GCC_BUILD_DIR_MINIMAL); \
 		PATH='$(TARGET_PATH)' \
-		CFLAGS="-O0 -g0" \
-		CXXFLAGS="-O0 -g0" \
+		CFLAGS="-O0 -g0 -fomit-frame-pointer" \
+		CXXFLAGS="-O0 -g0 -fomit-frame-pointer" \
 		$(WRKBUILD)/configure \
 			${GCC_CONFOPTS} \
 			--enable-languages=c \
@@ -216,8 +216,8 @@ $(GCC_BUILD_DIR_INITIAL)/.configured:
 	mkdir -p $(GCC_BUILD_DIR_INITIAL)
 	cd $(GCC_BUILD_DIR_INITIAL); \
 		PATH='$(TARGET_PATH)' \
-		CFLAGS="-O0 -g0" \
-		CXXFLAGS="-O0 -g0" \
+		CFLAGS="-O0 -g0 -fomit-frame-pointer" \
+		CXXFLAGS="-O0 -g0 -fomit-frame-pointer" \
 		$(WRKBUILD)/configure \
 			${GCC_CONFOPTS} \
 			${GCC_FINAL_CONFOPTS} \