summaryrefslogtreecommitdiff
path: root/misc/buildroot/toolchain/gcc
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-01-06 13:37:36 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-01-06 13:37:36 +0000
commit68b1c0a591b94fe7ae59da4b929fbd8561f88718 (patch)
tree85590e4e464481fa07613e0563441e2055e2a0d3 /misc/buildroot/toolchain/gcc
parent22dec0ce41614f36c9e09f77d1145425b64527b3 (diff)
downloadnuttx-68b1c0a591b94fe7ae59da4b929fbd8561f88718.tar.gz
nuttx-68b1c0a591b94fe7ae59da4b929fbd8561f88718.tar.bz2
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/buildroot/toolchain/gcc')
-rw-r--r--misc/buildroot/toolchain/gcc/4.2.4/306-libstdc++-namespace.patch36
-rw-r--r--misc/buildroot/toolchain/gcc/4.2.4/930-nuttx-nolibc.patch30
-rw-r--r--misc/buildroot/toolchain/gcc/Config.in26
-rw-r--r--misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk36
-rw-r--r--misc/buildroot/toolchain/gcc/gcc-nuttx-4.x.mk65
5 files changed, 62 insertions, 131 deletions
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