From 20ff4c56d20fe8c22d6ac44c02efd1252b32ade6 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 7 Apr 2011 00:42:46 +0000 Subject: m9s12x toolchain Ubuntu 9.10 build fix git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3476 42af7a65-404d-4744-a932-0658087f49c3 --- misc/buildroot/configs/m9s12x-config-3.3.6 | 2 +- misc/buildroot/toolchain/gcc/3.3.6/910-create-mode.patch | 11 +++++++++++ nuttx/configs/qemu-i486/README.txt | 6 +++++- nuttx/configs/qemu-i486/nsh/Make.defs | 1 + nuttx/configs/qemu-i486/ostest/Make.defs | 1 + 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 misc/buildroot/toolchain/gcc/3.3.6/910-create-mode.patch diff --git a/misc/buildroot/configs/m9s12x-config-3.3.6 b/misc/buildroot/configs/m9s12x-config-3.3.6 index 1b50e1469..ab75d010d 100644 --- a/misc/buildroot/configs/m9s12x-config-3.3.6 +++ b/misc/buildroot/configs/m9s12x-config-3.3.6 @@ -37,7 +37,7 @@ BR2_BZCAT="bzcat" BR2_TAR_OPTIONS="" BR2_DL_DIR="$(BASE_DIR)/../archives" BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir" -BR2_NUTTX_DIR="$(TOPDIR)/../nuttx" +BR2_NUTTX_DIR="$(TOPDIR)/../../nuttx" BR2_TOPDIR_PREFIX="" BR2_TOPDIR_SUFFIX="" BR2_GNU_BUILD_SUFFIX="pc-elf" diff --git a/misc/buildroot/toolchain/gcc/3.3.6/910-create-mode.patch b/misc/buildroot/toolchain/gcc/3.3.6/910-create-mode.patch new file mode 100644 index 000000000..20a9e8378 --- /dev/null +++ b/misc/buildroot/toolchain/gcc/3.3.6/910-create-mode.patch @@ -0,0 +1,11 @@ +--- gcc-3.3.6/gcc/collect2.c 2011-04-06 18:36:17.269806677 -0600 ++++ gcc-3.3.6/gcc/collect2.c 2011-04-06 18:36:34.385799826 -0600 +@@ -1580,7 +1580,7 @@ + if (redir) + { + /* Open response file. */ +- redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT); ++ redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0666); + + /* Duplicate the stdout and stderr file handles + so they can be restored later. */ diff --git a/nuttx/configs/qemu-i486/README.txt b/nuttx/configs/qemu-i486/README.txt index 906591534..254f8a131 100644 --- a/nuttx/configs/qemu-i486/README.txt +++ b/nuttx/configs/qemu-i486/README.txt @@ -137,7 +137,11 @@ FAQ === Q: I get the following error message, "undefined reference to '__stack_chk_fail'" -A: Add -fno-stack-protector to ARCHCPUFLAGS in you Make.defs file. +A: Add -fno-stack-protector to ARCHCPUFLAGS in you Make.defs file. Switch the + commenting on the following two lines in the Make.defs file: + + ARCHCPUFLAGS = -march=i486 -mtune=i486 -fno-builtin + #ARCHCPUFLAGS = -march=i486 -mtune=i486 -fno-builtin -fno-stack-protector Configurations ============== diff --git a/nuttx/configs/qemu-i486/nsh/Make.defs b/nuttx/configs/qemu-i486/nsh/Make.defs index 8a30d09fd..d18c80293 100644 --- a/nuttx/configs/qemu-i486/nsh/Make.defs +++ b/nuttx/configs/qemu-i486/nsh/Make.defs @@ -61,6 +61,7 @@ else endif ARCHCPUFLAGS = -march=i486 -mtune=i486 -fno-builtin +#ARCHCPUFLAGS = -march=i486 -mtune=i486 -fno-builtin -fno-stack-protector ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHDEFINES = diff --git a/nuttx/configs/qemu-i486/ostest/Make.defs b/nuttx/configs/qemu-i486/ostest/Make.defs index 4cd8f5774..5851427e6 100644 --- a/nuttx/configs/qemu-i486/ostest/Make.defs +++ b/nuttx/configs/qemu-i486/ostest/Make.defs @@ -61,6 +61,7 @@ else endif ARCHCPUFLAGS = -march=i486 -mtune=i486 -fno-builtin +#ARCHCPUFLAGS = -march=i486 -mtune=i486 -fno-builtin -fno-stack-protector ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHDEFINES = -- cgit v1.2.3