summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-05-11 21:41:42 +0000
committerKoen Kooi <koen@openembedded.org>2008-05-11 21:41:42 +0000
commit28a13646cfe91767462bd3676154ee57f0865b44 (patch)
tree76cde2429363f6bdce69f743b7ce5e7199327311
parent11a5ea4db23cca76ab6711f98a51a0a61654c2a1 (diff)
gcc csl 2008q1: add some OE sanity patches and fix EXTRA_OECONF
-rw-r--r--packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb3
-rw-r--r--packages/gcc/gcc-csl-arm-2008q1.inc5
-rw-r--r--packages/gcc/gcc-csl-arm/fortran-static-linking.patch48
-rw-r--r--packages/gcc/gcc-csl-arm/gcc41-configure.in.patch22
-rw-r--r--packages/gcc/gcc-csl-arm/ldflags.patch22
-rw-r--r--packages/gcc/gcc-csl-arm/pr34130.patch16
-rw-r--r--packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch16
7 files changed, 130 insertions, 2 deletions
diff --git a/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb b/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb
index e8b44a6d42..c9f03a7920 100644
--- a/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb
+++ b/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb
@@ -3,5 +3,4 @@ require gcc-cross-initial.inc
S = "${WORKDIR}/gcc-4.2"
-EXTRA_OECONF += "--disable-libmudflap \
- --disable-libssp"
+EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap "
diff --git a/packages/gcc/gcc-csl-arm-2008q1.inc b/packages/gcc/gcc-csl-arm-2008q1.inc
index dcd02c7615..bca80c0fca 100644
--- a/packages/gcc/gcc-csl-arm-2008q1.inc
+++ b/packages/gcc/gcc-csl-arm-2008q1.inc
@@ -6,6 +6,11 @@ PV = "4.2.3+csl-arm-2008q1-126"
FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2008q1-126-arm-none-eabi.src.tar.bz2 \
+ file://gcc41-configure.in.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://gfortran.patch;patch=1 \
+ file://fortran-static-linking.patch;patch=1 \
# file://gcc-configure-no-fortran.patch;patch=1;pnum=1 \
# file://gcc-new-makeinfo.patch;patch=1 \
"
diff --git a/packages/gcc/gcc-csl-arm/fortran-static-linking.patch b/packages/gcc/gcc-csl-arm/fortran-static-linking.patch
new file mode 100644
index 0000000000..3dd6321dc3
--- /dev/null
+++ b/packages/gcc/gcc-csl-arm/fortran-static-linking.patch
@@ -0,0 +1,48 @@
+f951 (fortran) links to MPFR and GMP of our staging area but when executing
+the command the libs can not be found. Use rpath like all the other apps in
+our staging bin/ directory.
+
+Patch the configure to avoid the regeneration...
+
+Index: gcc-4.2.2/configure
+===================================================================
+--- gcc-4.2.2.orig/configure 2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure 2008-01-15 23:25:20.000000000 +0100
+@@ -2278,14 +2278,14 @@
+
+
+ if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+ fi
+ if test "x$with_mpfr_lib" != x; then
+- gmplibs="-L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
+ fi
+
+ # Specify a location for gmp
+Index: gcc-4.2.2/configure.in
+===================================================================
+--- gcc-4.2.2.orig/configure.in 2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure.in 2008-01-15 23:24:36.000000000 +0100
+@@ -1066,14 +1066,14 @@
+ AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library])
+
+ if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+ fi
+ if test "x$with_mpfr_lib" != x; then
+- gmplibs="-L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
+ fi
+
+ # Specify a location for gmp
diff --git a/packages/gcc/gcc-csl-arm/gcc41-configure.in.patch b/packages/gcc/gcc-csl-arm/gcc41-configure.in.patch
new file mode 100644
index 0000000000..3d33bcb978
--- /dev/null
+++ b/packages/gcc/gcc-csl-arm/gcc41-configure.in.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700
++++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700
+@@ -1907,7 +1907,7 @@
+ *) gxx_include_dir=${with_gxx_include_dir} ;;
+ esac
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700
++++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700
+@@ -2669,7 +2669,7 @@
+ *) gxx_include_dir=${with_gxx_include_dir} ;;
+ esac
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
diff --git a/packages/gcc/gcc-csl-arm/ldflags.patch b/packages/gcc/gcc-csl-arm/ldflags.patch
new file mode 100644
index 0000000000..9576f60778
--- /dev/null
+++ b/packages/gcc/gcc-csl-arm/ldflags.patch
@@ -0,0 +1,22 @@
+--- /tmp/Makefile.in 2006-02-23 20:56:01.399758728 +0100
++++ gcc-4.1-20060217/Makefile.in 2006-02-23 20:56:16.874406224 +0100
+@@ -334,7 +334,7 @@
+ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+-LDFLAGS_FOR_TARGET =
++LDFLAGS_FOR_TARGET = @LDFLAGS@
+ PICFLAG_FOR_TARGET =
+
+ # ------------------------------------
+--- /tmp/Makefile.tpl 2006-02-23 20:50:34.077519272 +0100
++++ gcc-4.1-20060217/Makefile.tpl 2006-02-23 21:04:31.092273688 +0100
+@@ -337,7 +337,7 @@
+ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+-LDFLAGS_FOR_TARGET =
++LDFLAGS_FOR_TARGET = @LDFLAGS@
+ PICFLAG_FOR_TARGET =
+
+ # ------------------------------------
diff --git a/packages/gcc/gcc-csl-arm/pr34130.patch b/packages/gcc/gcc-csl-arm/pr34130.patch
new file mode 100644
index 0000000000..415335f4b4
--- /dev/null
+++ b/packages/gcc/gcc-csl-arm/pr34130.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.1.2/gcc/fold-const.c
+===================================================================
+--- gcc-4.1.2.orig/gcc/fold-const.c 2007-11-21 18:53:42.000000000 +0100
++++ gcc-4.1.2/gcc/fold-const.c 2007-11-21 18:56:26.000000000 +0100
+@@ -5339,7 +5339,10 @@
+ }
+ break;
+ }
+- /* FALLTHROUGH */
++ /* If the constant is negative, we cannot simplify this. */
++ if (tree_int_cst_sgn (c) == -1)
++ break;
++ /* FALLTHROUGH */
+ case NEGATE_EXPR:
+ if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
+ return fold_build1 (tcode, ctype, fold_convert (ctype, t1));
diff --git a/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch b/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
new file mode 100644
index 0000000000..921cab6e18
--- /dev/null
+++ b/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
@@ -0,0 +1,16 @@
+upstream: n/a
+comment: Use the preprocessor we have just compiled instead the one of
+the system. There might be incompabilities between us and them.
+
+Index: gcc-4.1.1/Makefile.in
+===================================================================
+--- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200
++++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200
+@@ -194,6 +194,7 @@
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \