diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-01-06 13:37:36 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-01-06 13:37:36 +0000 |
commit | 68b1c0a591b94fe7ae59da4b929fbd8561f88718 (patch) | |
tree | 85590e4e464481fa07613e0563441e2055e2a0d3 /misc | |
parent | 22dec0ce41614f36c9e09f77d1145425b64527b3 (diff) | |
download | px4-nuttx-68b1c0a591b94fe7ae59da4b929fbd8561f88718.tar.gz px4-nuttx-68b1c0a591b94fe7ae59da4b929fbd8561f88718.tar.bz2 px4-nuttx-68b1c0a591b94fe7ae59da4b929fbd8561f88718.zip |
Add ARM 4.2.4 toolchain
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1465 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc')
-rw-r--r-- | misc/buildroot/ChangeLog | 2 | ||||
-rw-r--r-- | misc/buildroot/Makefile | 11 | ||||
-rw-r--r-- | misc/buildroot/configs/README.txt | 17 | ||||
-rw-r--r-- | misc/buildroot/configs/arm-defconfig-4.2.4 | 134 | ||||
-rw-r--r-- | misc/buildroot/toolchain/binutils/binutils.mk | 35 | ||||
-rwxr-xr-x | misc/buildroot/toolchain/dependencies/dependencies.sh | 12 | ||||
-rw-r--r-- | misc/buildroot/toolchain/gcc/4.2.4/306-libstdc++-namespace.patch | 36 | ||||
-rw-r--r-- | misc/buildroot/toolchain/gcc/4.2.4/930-nuttx-nolibc.patch | 30 | ||||
-rw-r--r-- | misc/buildroot/toolchain/gcc/Config.in | 26 | ||||
-rw-r--r-- | misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk | 36 | ||||
-rw-r--r-- | misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk | 65 |
11 files changed, 229 insertions, 175 deletions
diff --git a/misc/buildroot/ChangeLog b/misc/buildroot/ChangeLog index 55ed47610..c0b987b26 100644 --- a/misc/buildroot/ChangeLog +++ b/misc/buildroot/ChangeLog @@ -13,3 +13,5 @@ buildroot-0.1.2 2008-11-06 <spudmonkey@racsa.co.cr> buildroot-0.1.3 2008-xx-xx <spudmonkey@racsa.co.cr> * Add support for H8/300 toolchain + * Add support for GCC 4.2.4 and binutils 2.19 + * New ARM configuration using GCC 4.2.4 and binutils 2.19 diff --git a/misc/buildroot/Makefile b/misc/buildroot/Makefile index 9bdfbea61..9546d8a4a 100644 --- a/misc/buildroot/Makefile +++ b/misc/buildroot/Makefile @@ -128,16 +128,7 @@ $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include : $(STAGING_DIR) $(NUTTX_DIR)/inc $(TOOL_BUILD_DIR): mkdir -p $(TOOL_BUILD_DIR) -$(TOOL_BUILD_DIR)/nuttx_dev: $(TOOL_BUILD_DIR) - mkdir -p $(TOOL_BUILD_DIR)/nuttx_dev - -$(TOOL_BUILD_DIR)/nuttx_dev/usr: $(TOOL_BUILD_DIR)/nuttx_dev - mkdir -p $(TOOL_BUILD_DIR)/nuttx_dev/usr - -$(TOOL_BUILD_DIR)/nuttx_dev/usr/include: $(TOOL_BUILD_DIR)/nuttx_dev/usr - mkdir -p $(TOOL_BUILD_DIR)/nuttx_dev/usr/include - -nuttx_setup: $(TOOL_BUILD_DIR)/nuttx_dev/usr/include +nuttx_setup: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include source: $(TARGETS_SOURCE) diff --git a/misc/buildroot/configs/README.txt b/misc/buildroot/configs/README.txt new file mode 100644 index 000000000..4041a24d5 --- /dev/null +++ b/misc/buildroot/configs/README.txt @@ -0,0 +1,17 @@ +arm-defconfig + Builds an ARM toolchain using gcc 3.4.5 + +arm-defconfig-4.2.4 + Builds an ARM toolchain using gcc 4.2.4 + +h8300_config + Builds an H8/300 toolchain using gcc 3.4.5 + +m68hc11-config + Builds an hc11 toolchain using gcc 3.4.5 + +m68k-config + Builds an M68K toolchain using gcc 3.4.5 + +sh-defconfig + Builds an SH-1/2 toolchain using gcc 3.4.5 diff --git a/misc/buildroot/configs/arm-defconfig-4.2.4 b/misc/buildroot/configs/arm-defconfig-4.2.4 new file mode 100644 index 000000000..766e1db9c --- /dev/null +++ b/misc/buildroot/configs/arm-defconfig-4.2.4 @@ -0,0 +1,134 @@ +# +# Automatically generated make config: don't edit +# +BR2_HAVE_DOT_CONFIG=y +# BR2_alpha is not set +BR2_arm=y +# BR2_armeb is not set +# BR2_avr32 is not set +# BR2_cris is not set +# BR2_i386 is not set +# BR2_m68k is not set +# BR2_m68hc11 is not set +# BR2_m68hc12 is not set +# BR2_mips is not set +# BR2_mipsel is not set +# BR2_nios2 is not set +# BR2_powerpc is not set +# BR2_sh is not set +# BR2_sh64 is not set +# BR2_h8300 is not set +# BR2_sparc is not set +# BR2_x86_64 is not set +BR2_generic_arm=y +# BR2_arm610 is not set +# BR2_arm710 is not set +# BR2_arm720t is not set +# BR2_arm920t is not set +# BR2_arm922t is not set +# BR2_arm926t is not set +# BR2_arm1136jf_s is not set +# BR2_sa110 is not set +# BR2_sa1100 is not set +# BR2_xscale is not set +# BR2_iwmmxt is not set +BR2_ARM_TYPE="GENERIC_ARM" +BR2_ARM_OABI=y +# BR2_ARM_EABI is not set +BR2_ARCH="arm" +BR2_ENDIAN="LITTLE" + +# +# Build options +# +BR2_WGET="wget --passive-ftp" +BR2_SVN="svn co" +BR2_ZCAT="zcat" +BR2_BZCAT="bzcat" +BR2_TAR_OPTIONS="" +BR2_DL_DIR="$(BASE_DIR)/../archives" +BR2_SOURCEFORGE_MIRROR="easynews" +BR2_ATMEL_MIRROR="ftp://at91dist:distrib@81.80.104.162/AT91_Third_Party_Design_Flow/Linux_Host/" +BR2_AT91_PATCH_MIRROR="http://maxim.org.za/AT91RM9200/2.6/" +BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir" +BR2_NUTTX_DIR="$(TOPDIR)/../nuttx" +BR2_TOPDIR_PREFIX="" +BR2_TOPDIR_SUFFIX="" +BR2_GNU_BUILD_SUFFIX="arm-elf" +BR2_GNU_TARGET_SUFFIX="elf" +# BR2_PREFER_IMA is not set +# BR2_DEPRECATED is not set + +# +# Toolchain Options +# + +# +# Binutils Options +# +# BR2_BINUTILS_VERSION_2_14_90_0_8 is not set +# BR2_BINUTILS_VERSION_2_15 is not set +# BR2_BINUTILS_VERSION_2_15_94_0_2_2 is not set +# BR2_BINUTILS_VERSION_2_16_1 is not set +# BR2_BINUTILS_VERSION_2_16_90_0_3 is not set +# BR2_BINUTILS_VERSION_2_16_91_0_5 is not set +# BR2_BINUTILS_VERSION_2_16_91_0_6 is not set +# BR2_BINUTILS_VERSION_2_16_91_0_7 is not set +# BR2_BINUTILS_VERSION_2_17 is not set +# BR2_BINUTILS_VERSION_2_17_50_0_2 is not set +# BR2_BINUTILS_VERSION_2_17_50_0_3 is not set +# BR2_BINUTILS_VERSION_2_17_50_0_4 is not set +# BR2_BINUTILS_VERSION_2_17_50_0_5 is not set +# BR2_BINUTILS_VERSION_2_17_50_0_6 is not set +# BR2_BINUTILS_VERSION_2_17_50_0_7 is not set +# BR2_BINUTILS_VERSION_2_17_50_0_8 is not set +# BR2_BINUTILS_VERSION_2_17_50_0_9 is not set +# BR2_BINUTILS_VERSION_2_17_50_0_10 is not set +BR2_BINUTILS_VERSION_2_19=y +BR2_BINUTILS_VERSION="2.19" +BR2_EXTRA_BINUTILS_CONFIG_OPTIONS="" + +# +# GCC Options +# +# BR2_GCC_VERSION_3_3_5 is not set +# BR2_GCC_VERSION_3_3_6 is not set +# BR2_GCC_VERSION_3_4_2 is not set +# BR2_GCC_VERSION_3_4_3 is not set +# BR2_GCC_VERSION_3_4_4 is not set +# BR2_GCC_VERSION_3_4_5 is not set +# BR2_GCC_VERSION_3_4_6 is not set +# BR2_GCC_VERSION_4_0_0 is not set +# BR2_GCC_VERSION_4_0_1 is not set +# BR2_GCC_VERSION_4_0_2 is not set +# BR2_GCC_VERSION_4_0_3 is not set +# BR2_GCC_VERSION_4_0_4 is not set +# BR2_GCC_VERSION_4_1_0 is not set +# BR2_GCC_VERSION_4_1_1 is not set +# BR2_GCC_VERSION_4_1_2 is not set +# BR2_GCC_VERSION_4_2 is not set +BR2_GCC_VERSION_4_2_4=y +BR2_GCC_SUPPORTS_SYSROOT=y +BR2_GCC_VERSION="4.2.4" +# BR2_GCC_USE_SJLJ_EXCEPTIONS is not set +BR2_EXTRA_GCC_CONFIG_OPTIONS="" +# BR2_INSTALL_LIBSTDCPP is not set +# BR2_INSTALL_OBJC is not set +# BR2_INSTALL_FORTRAN is not set + +# +# Gdb Options +# +# BR2_PACKAGE_GDB is not set +# BR2_PACKAGE_GDB_SERVER is not set +# BR2_PACKAGE_GDB_HOST is not set + +# +# Common Toolchain Options +# +# BR2_PACKAGE_SSTRIP_TARGET is not set +# BR2_PACKAGE_SSTRIP_HOST is not set +# BR2_ENABLE_MULTILIB is not set +BR2_LARGEFILE=y +BR2_SOFT_FLOAT=y +BR2_TARGET_OPTIMIZATION="-Os -pipe" diff --git a/misc/buildroot/toolchain/binutils/binutils.mk b/misc/buildroot/toolchain/binutils/binutils.mk index ff3ba338b..2c4f01531 100644 --- a/misc/buildroot/toolchain/binutils/binutils.mk +++ b/misc/buildroot/toolchain/binutils/binutils.mk @@ -9,58 +9,37 @@ BINUTILS_VERSION:=$(strip $(subst ",, $(BR2_BINUTILS_VERSION))) EXTRA_BINUTILS_CONFIG_OPTIONS=$(strip $(subst ",, $(BR2_EXTRA_BINUTILS_CONFIG_OPTIONS))) #")) BINUTILS_SITE:=ftp://ftp.kernel.org/pub/linux/devel/binutils +ifeq ($(BINUTILS_VERSION),2.19) +BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/ +endif ifeq ($(BINUTILS_VERSION),2.17) BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/ endif ifeq ($(BINUTILS_VERSION),2.16) BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/ -BINUTILS_NO_MPFR:=y endif ifeq ($(BINUTILS_VERSION),2.16.1) BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/ -BINUTILS_NO_MPFR:=y endif ifeq ($(BINUTILS_VERSION),2.15) BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/ -BINUTILS_NO_MPFR:=y endif ifeq ($(BINUTILS_VERSION),2.14) BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/ -BINUTILS_NO_MPFR:=y endif ifeq ($(BINUTILS_VERSION),2.13) BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/ -BINUTILS_NO_MPFR:=y endif ifeq ($(BINUTILS_VERSION),2.15.97) BINUTILS_SITE:=ftp://sources.redhat.com/pub/binutils/snapshots/ -BINUTILS_NO_MPFR:=y endif -# We do not rely on the host's gmp/mpfr but use a known working one +# NOTE: Unlike the original buildroot binutils.mk, this version always relies on +# the system libgmp and libmpfr which must be installed for certain binutils versions. + BINUTILS_HOST_PREREQ:= BINUTILS_TARGET_PREREQ:= -ifeq ($(findstring 3.,$(GCC_VERSION)),3.) -BINUTILS_NO_MPFR:=y -endif -ifeq ($(findstring 4.0,$(GCC_VERSION)),4.0) -BINUTILS_NO_MPFR:=y -endif - -ifndef BINUTILS_NO_MPFR -BINUTILS_HOST_PREREQ:=$(TOOL_BUILD_DIR)/gmp/lib/libgmp.so \ - $(TOOL_BUILD_DIR)/mpfr/lib/libmpfr.so - -BINUTILS_TARGET_PREREQ:=$(TARGET_DIR)/lib/libgmp.so \ - $(TARGET_DIR)/lib/libmpfr.so -EXTRA_BINUTILS_CONFIG_OPTIONS+=--with-gmp="$(GMP_HOST_DIR)" -EXTRA_BINUTILS_CONFIG_OPTIONS+=--with-mpfr="$(MPFR_HOST_DIR)" - -BINUTILS_TARGET_CONFIG_OPTIONS=--with-gmp="$(GMP_TARGET_DIR)" -BINUTILS_TARGET_CONFIG_OPTIONS+=--with-mpfr="$(MPFR_TARGET_DIR)" -endif - BINUTILS_SOURCE:=binutils-$(BINUTILS_VERSION).tar.bz2 BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION) BINUTILS_CAT:=$(BZCAT) @@ -92,8 +71,6 @@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ --target=$(REAL_GNU_TARGET_NAME) \ - --with-build-sysroot="$(TOOL_BUILD_DIR)/nuttx_dev/" \ - --with-sysroot="$(TOOL_BUILD_DIR)/nuttx_dev/" \ $(DISABLE_NLS) \ $(MULTILIB) \ --disable-werror \ diff --git a/misc/buildroot/toolchain/dependencies/dependencies.sh b/misc/buildroot/toolchain/dependencies/dependencies.sh index 6f42a8746..c071fddc0 100755 --- a/misc/buildroot/toolchain/dependencies/dependencies.sh +++ b/misc/buildroot/toolchain/dependencies/dependencies.sh @@ -1,6 +1,6 @@ #!/bin/sh # vi: set sw=4 ts=4: -#set -x +# set -x echo "" echo "Checking build system dependencies:" @@ -165,7 +165,8 @@ if [ -z "$COMPILER" ] ; then exit 1; fi; -COMPILER_VERSION=$($COMPILER --version 2>&1 | head -n1 | $XSED -e 's/^.*(.CC) \([0-9\.]\)/\1/g' -e "s/[-\ ].*//g") +COMPILER_VERSION=$($COMPILER -v 2>&1 | $XSED -n '/^gcc version/p' | + $XSED -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') if [ -z "$COMPILER_VERSION" ] ; then echo "gcc installed: FALSE" /bin/echo -e "\n\nYou must install 'gcc' on your build machine\n"; @@ -182,9 +183,9 @@ echo "C compiler version '$COMPILER_VERSION': Ok" # check for host CXX -CXXCOMPILER=$(which $HOSTCXX) +CXXCOMPILER=$(which $HOSTCXX 2>/dev/null) if [ -z "$CXXCOMPILER" ] ; then - CXXCOMPILER=$(which c++) + CXXCOMPILER=$(which c++ 2>/dev/null) fi if [ -z "$CXXCOMPILER" ] ; then echo "C++ Compiler installed: FALSE" @@ -192,7 +193,8 @@ if [ -z "$CXXCOMPILER" ] ; then #exit 1 fi if [ ! -z "$CXXCOMPILER" ] ; then - CXXCOMPILER_VERSION=$($CXXCOMPILER --version 2>&1 | head -n1 | $XSED -e 's/^.*(.CC) \([0-9\.]\)/\1/g' -e "s/[-\ ].*//g") + CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | $XSED -n '/^gcc version/p' | + $XSED -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') if [ -z "$CXXCOMPILER_VERSION" ] ; then echo "c++ installed: FALSE" /bin/echo -e "\nYou may have to install 'g++' on your build machine\n" diff --git a/misc/buildroot/toolchain/gcc/4.2.4/306-libstdc++-namespace.patch b/misc/buildroot/toolchain/gcc/4.2.4/306-libstdc++-namespace.patch deleted file mode 100644 index 69587ca63..000000000 --- a/misc/buildroot/toolchain/gcc/4.2.4/306-libstdc++-namespace.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h ---- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100 -+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100 -@@ -32,7 +32,8 @@ - // - - // Written by Benjamin Kosnik <bkoz@redhat.com> -- -+namespace std -+{ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix prototypes for *textdomain funcs - #endif -@@ -115,3 +116,4 @@ - this->_S_create_c_locale(this->_M_c_locale_messages, __s); - } - } -+} -diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h ---- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100 -+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100 -@@ -33,7 +33,8 @@ - // - - // Written by Benjamin Kosnik <bkoz@redhat.com> -- -+namespace std -+{ - template<typename _CharT> - __timepunct<_CharT>::__timepunct(size_t __refs) - : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -@@ -74,3 +75,4 @@ - delete _M_data; - _S_destroy_c_locale(_M_c_locale_timepunct); - } -+} diff --git a/misc/buildroot/toolchain/gcc/4.2.4/930-nuttx-nolibc.patch b/misc/buildroot/toolchain/gcc/4.2.4/930-nuttx-nolibc.patch new file mode 100644 index 000000000..4503ed619 --- /dev/null +++ b/misc/buildroot/toolchain/gcc/4.2.4/930-nuttx-nolibc.patch @@ -0,0 +1,30 @@ +At present, libstdc++ will not build. My understanding is that it needs to have +the NuttX libc characterized in crossconfig.m4. This is a first attempt to do that -- +unfortunately, it still does not work. + +diff -u gcc-4.2.4/libstdc++-v3/configure.orig gcc-4.2.4/libstdc++-v3/configure +--- gcc-4.2.4/libstdc++-v3/configure.orig 2009-01-05 17:52:11.000000000 -0600 ++++ gcc-4.2.4/libstdc++-v3/configure 2009-01-05 17:52:43.000000000 -0600 +@@ -108515,9 +108515,7 @@ + + ;; + *) +- { { echo "$as_me:$LINENO: error: No support for this host/target combination." >&5 +-echo "$as_me: error: No support for this host/target combination." >&2;} +- { (exit 1); exit 1; }; } ++ # Assume bare hardware + ;; + esac + +diff -u gcc-4.2.4/libstdc++-v3/crossconfig.m4.orig gcc-4.2.4/libstdc++-v3/crossconfig.m4 +--- gcc-4.2.4/libstdc++-v3/crossconfig.m4.orig 2009-01-05 17:51:07.000000000 -0600 ++++ gcc-4.2.4/libstdc++-v3/crossconfig.m4 2009-01-05 17:52:02.000000000 -0600 +@@ -412,7 +412,7 @@ + AC_DEFINE(HAVE_TANHL) + ;; + *) +- AC_MSG_ERROR([No support for this host/target combination.]) ++ # Assume bare hardware + ;; + esac + ]) diff --git a/misc/buildroot/toolchain/gcc/Config.in b/misc/buildroot/toolchain/gcc/Config.in index f883723b0..ecf2d67cd 100644 --- a/misc/buildroot/toolchain/gcc/Config.in +++ b/misc/buildroot/toolchain/gcc/Config.in @@ -103,19 +103,19 @@ config BR2_GCC_VERSION default "4.2" if BR2_GCC_VERSION_4_2 default "4.2.4" if BR2_GCC_VERSION_4_2_4 -config BR2_TOOLCHAIN_SYSROOT - bool "Enable toolchain with --sysroot support" - depends on BR2_GCC_SUPPORTS_SYSROOT - default y - help - Enables --sysroot=dir for binutils and gcc. - Use dir as the logical root directory for headers and libraries. - For example, if the compiler would normally search for headers in - /usr/include and libraries in /usr/lib, it will instead search - dir/usr/include and dir/usr/lib. - - This does not work with gcc < 4.2.0 (4.1.2 gets - ORIGINAL_AS_FOR_TARGET wrong) +#config BR2_TOOLCHAIN_SYSROOT +# bool "Enable toolchain with --sysroot support" +# depends on BR2_GCC_SUPPORTS_SYSROOT +# default y +# help +# Enables --sysroot=dir for binutils and gcc. +# Use dir as the logical root directory for headers and libraries. +# For example, if the compiler would normally search for headers in +# /usr/include and libraries in /usr/lib, it will instead search +# dir/usr/include and dir/usr/lib. +# +# This does not work with gcc < 4.2.0 (4.1.2 gets +# ORIGINAL_AS_FOR_TARGET wrong) config BR2_GCC_USE_SJLJ_EXCEPTIONS bool "Enable setjmp/longjmp exceptions?" diff --git a/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk b/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk index 2a9a7faf8..2c30ff6be 100644 --- a/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk +++ b/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk @@ -18,7 +18,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Without sysroot support. Sysroot toolchain is gcc-uclibc-4.x.mk -ifneq ($(BR2_TOOLCHAIN_SYSROOT),y) +ifneq ($(BR2_GCC_SUPPORTS_SYSROOT),y) GCC_OFFICIAL_VER:=$(GCC_VERSION) GCC_SITE:=http://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VERSION) @@ -28,20 +28,6 @@ GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_OFFICIAL_VER) GCC_CAT:=$(BZCAT) GCC_STRIP_HOST_BINARIES:=true -ifeq ($(findstring x3.,x$(GCC_VERSION)),x3.) -GCC_NO_MPFR:=y -else -ifneq ($(BR2_INSTALL_FORTRAN),y) -# fortran needs gmp and mpfr -ifeq ($(findstring 4.0.,$(GCC_VERSION)),4.0.) -GCC_NO_MPFR:=y -endif -ifeq ($(findstring 4.1.,$(GCC_VERSION)),4.1.) -GCC_NO_MPFR:=y -endif -endif -endif - ############################################################# # # Setup some initial stuff @@ -49,6 +35,8 @@ endif ############################################################# GCC_TARGET_LANGUAGES:=c +GCC_TARGET_PREREQ= +GCC_STAGING_PREREQ= ifeq ($(BR2_INSTALL_LIBSTDCPP),y) GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),c++ @@ -62,21 +50,9 @@ ifeq ($(BR2_INSTALL_OBJC),y) GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),objc endif -GCC_TARGET_PREREQ= -GCC_STAGING_PREREQ= - -ifndef GCC_NO_MPFR -GCC_WITH_HOST_GMP=--with-gmp=$(GMP_HOST_DIR) -GCC_WITH_HOST_MPFR=--with-mpfr=$(MPFR_HOST_DIR) - ifeq ($(BR2_INSTALL_FORTRAN),y) GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),fortran -#GCC_TARGET_PREREQ += $(TARGET_DIR)/lib/libmpfr.so $(TARGET_DIR)/lib/libgmp.so -#GCC_STAGING_PREREQ+= $(TOOL_BUILD_DIR)/mpfr/lib/libmpfr.so -GCC_WITH_TARGET_GMP=--with-gmp="$(GMP_TARGET_DIR)" -GCC_WITH_TARGET_MPFR=--with-mpfr="$(MPFR_TARGET_DIR)" endif -endif # ifndef GCC_NO_MPFR GCC_SHARED_LIBGCC:=--disable-shared @@ -145,8 +121,6 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched --enable-target-optspace \ --with-gnu-ld \ --disable-shared \ - $(GCC_WITH_HOST_GMP) \ - $(GCC_WITH_HOST_MPFR) \ $(DISABLE_NLS) \ $(THREADS) \ $(MULTILIB) \ @@ -201,8 +175,6 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(GCC_STAGING_PREREQ) --disable-__cxa_atexit \ --enable-target-optspace \ --with-gnu-ld \ - $(GCC_WITH_HOST_GMP) \ - $(GCC_WITH_HOST_MPFR) \ $(GCC_SHARED_LIBGCC) \ $(DISABLE_NLS) \ $(THREADS) \ @@ -331,8 +303,6 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.prepared --disable-__cxa_atexit \ --with-gnu-ld \ $(GCC_SHARED_LIBGCC) \ - $(GCC_WITH_TARGET_GMP) \ - $(GCC_WITH_TARGET_MPFR) \ $(DISABLE_NLS) \ $(THREADS) \ $(MULTILIB) \ diff --git a/misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk b/misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk index 0b70b9b28..760cf1fc1 100644 --- a/misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk +++ b/misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk @@ -18,7 +18,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # sysroot support works with gcc >= 4.2.0 only -ifeq ($(BR2_TOOLCHAIN_SYSROOT),y) +ifeq ($(BR2_GCC_SUPPORTS_SYSROOT),y) GCC_OFFICIAL_VER:=$(GCC_VERSION) GCC_SITE:=http://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VERSION) @@ -29,20 +29,6 @@ GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_OFFICIAL_VER) GCC_CAT:=$(BZCAT) GCC_STRIP_HOST_BINARIES:=true -ifeq ($(findstring x3.,x$(GCC_VERSION)),x3.) -GCC_NO_MPFR:=y -else -ifneq ($(BR2_INSTALL_FORTRAN),y) -# fortran needs gmp and mpfr -ifeq ($(findstring 4.0.,$(GCC_VERSION)),4.0.) -GCC_NO_MPFR:=y -endif -ifeq ($(findstring 4.1.,$(GCC_VERSION)),4.1.) -GCC_NO_MPFR:=y -endif -endif -endif - ############################################################# # # Setup some initial stuff @@ -50,6 +36,8 @@ endif ############################################################# GCC_TARGET_LANGUAGES:=c +GCC_TARGET_PREREQ= +GCC_STAGING_PREREQ= ifeq ($(BR2_INSTALL_LIBSTDCPP),y) GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),c++ @@ -63,21 +51,9 @@ ifeq ($(BR2_INSTALL_OBJC),y) GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),objc endif -GCC_TARGET_PREREQ= -GCC_STAGING_PREREQ= - -ifndef GCC_NO_MPFR -GCC_WITH_HOST_GMP=--with-gmp=$(GMP_HOST_DIR) -GCC_WITH_HOST_MPFR=--with-mpfr=$(MPFR_HOST_DIR) - ifeq ($(BR2_INSTALL_FORTRAN),y) GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),fortran -#GCC_TARGET_PREREQ += $(TARGET_DIR)/lib/libmpfr.so $(TARGET_DIR)/lib/libgmp.so -#GCC_STAGING_PREREQ+= $(TOOL_BUILD_DIR)/mpfr/lib/libmpfr.so -GCC_WITH_TARGET_GMP=--with-gmp="$(GMP_TARGET_DIR)" -GCC_WITH_TARGET_MPFR=--with-mpfr="$(MPFR_TARGET_DIR)" endif -endif # ifndef GCC_NO_MPFR GCC_SHARED_LIBGCC:=--disable-shared @@ -143,11 +119,10 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched --target=$(REAL_GNU_TARGET_NAME) \ --enable-languages=c \ --disable-__cxa_atexit \ + --disable-libssp \ --enable-target-optspace \ --with-gnu-ld \ --disable-shared \ - $(GCC_WITH_HOST_GMP) \ - $(GCC_WITH_HOST_MPFR) \ $(DISABLE_NLS) \ $(THREADS) \ $(MULTILIB) \ @@ -198,10 +173,9 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(GCC_STAGING_PREREQ) --target=$(REAL_GNU_TARGET_NAME) \ --enable-languages=$(GCC_TARGET_LANGUAGES) \ --disable-__cxa_atexit \ + --disable-libssp \ --enable-target-optspace \ --with-gnu-ld \ - $(GCC_WITH_HOST_GMP) \ - $(GCC_WITH_HOST_MPFR) \ $(GCC_SHARED_LIBGCC) \ $(DISABLE_NLS) \ $(THREADS) \ @@ -329,9 +303,9 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.prepared --with-gxx-include-dir=/usr/include/c++ \ --disable-__cxa_atexit \ --with-gnu-ld \ + --with-gnu-as \ + --disable-libssp \ $(GCC_SHARED_LIBGCC) \ - $(GCC_WITH_TARGET_GMP) \ - $(GCC_WITH_TARGET_MPFR) \ $(DISABLE_NLS) \ $(THREADS) \ $(MULTILIB) \ @@ -370,15 +344,11 @@ GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(REAL_GCC_VERSION) else GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) endif -#XXX: FIXME: cleanup BR2_ARCH selection and establish BR2_CPU -#GCC_WITH_ARCH=--with-arch=$(BR2_ARCH) -#GCC_WITH_TUNE=--with-tune=$(BR2_ARCH) -#GCC_WITH_CPU=--with-cpu=$(BR2_ARCH) endif $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled - PATH=$(TARGET_PATH) \ - $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GCC_BUILD_DIR3) install + PATH=$(TARGET_PATH) DESTDIR=$(TARGET_DIR) \ + $(MAKE) -C $(GCC_BUILD_DIR3) install # Remove broken specs file (cross compile flag is set). rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/specs # @@ -395,15 +365,14 @@ endif # # Ok... that's enough of that. # - -(cd $(TARGET_DIR)/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR); $(STRIP) cc1 cc1plus collect2 > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/lib; $(STRIP) libstdc++.so.*.*.* > /dev/null 2>&1) - -(cd $(TARGET_DIR)/lib; $(STRIP) libgcc_s*.so.*.*.* > /dev/null 2>&1) + -(cd $(TARGET_DIR)/bin && find -type f | xargs $(STRIPCMD) > /dev/null 2>&1) + -(cd $(TARGET_DIR)/usr/bin && find -type f | xargs $(STRIPCMD) > /dev/null 2>&1) + -(cd $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR) && $(STRIPCMD) cc1 cc1plus collect2 > /dev/null 2>&1) + -(cd $(TARGET_DIR)/usr/lib && $(STRIPCMD) libstdc++.so.*.*.* > /dev/null 2>&1) + -(cd $(TARGET_DIR)/lib && $(STRIPCMD) libgcc_s*.so.*.*.* > /dev/null 2>&1) + # rm -f $(TARGET_DIR)/usr/lib/*.la* - #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ - # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc # Work around problem of missing syslimits.h if [ ! -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/include/syslimits.h ] ; then \ echo "warning: working around missing syslimits.h" ; \ @@ -414,9 +383,7 @@ endif if [ ! -e $(TARGET_DIR)/usr/bin/cc ] ; then \ ln -snf gcc $(TARGET_DIR)/usr/bin/cc ; \ fi; - # These are in /lib, so... - #rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so* - #touch -c $(TARGET_DIR)/usr/bin/gcc + touch -c $@ gcc_target: binutils_target $(TARGET_DIR)/usr/bin/gcc |