summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/bitbake.conf6
-rw-r--r--packages/gcc/gcc-3.4.4/zecke-no-host-includes.patch32
-rw-r--r--packages/gcc/gcc-4.0.0/zecke-no-host-includes.patch31
-rw-r--r--packages/gcc/gcc-4.0.2/zecke-no-host-includes.patch31
-rw-r--r--packages/gcc/gcc-4.1-20060217/zecke-no-host-includes.patch31
-rw-r--r--packages/gcc/gcc-4.1.0/zecke-no-host-includes.patch31
-rw-r--r--packages/gcc/gcc-4.2-20060513/zecke-no-host-includes.patch31
-rw-r--r--packages/gcc/gcc_3.4.4.bb1
-rw-r--r--packages/gcc/gcc_4.0.0.bb1
-rw-r--r--packages/gcc/gcc_4.0.2.bb2
-rw-r--r--packages/gcc/gcc_4.1-20060217.bb2
-rw-r--r--packages/gcc/gcc_4.1.0.bb2
-rw-r--r--packages/gcc/gcc_4.2-20060513.bb2
13 files changed, 201 insertions, 2 deletions
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 2043a500eb..54815cd0a0 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -239,9 +239,9 @@ EXTRA_OEMAKE = "-e MAKEFLAGS="
# Build flags and options.
##################################################################
-export BUILD_CPPFLAGS = "-I${STAGING_DIR}/${BUILD_SYS}/include"
+export BUILD_CPPFLAGS = "-isystem${STAGING_DIR}/${BUILD_SYS}/include"
export CPPFLAGS = "${TARGET_CPPFLAGS}"
-export TARGET_CPPFLAGS = "-I${STAGING_DIR}/${TARGET_SYS}/include"
+export TARGET_CPPFLAGS = "-isystem${STAGING_DIR}/${TARGET_SYS}/include"
export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
export CFLAGS = "${TARGET_CFLAGS}"
@@ -383,6 +383,8 @@ AUTO_LIBNAME_PKGS = "${PACKAGES}"
#
# This works for functions as well, they are really just environment variables.
OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}"
+# Alternative OVERRIDES to make compilation fail fast, we will enable it by default soon
+#OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast"
##################################################################
# Include the rest of the config files.
diff --git a/packages/gcc/gcc-3.4.4/zecke-no-host-includes.patch b/packages/gcc/gcc-3.4.4/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..069a965012
--- /dev/null
+++ b/packages/gcc/gcc-3.4.4/zecke-no-host-includes.patch
@@ -0,0 +1,32 @@
+Index: gcc-3.4.4/gcc/c-incpath.c
+===================================================================
+--- gcc-3.4.4.orig/gcc/c-incpath.c 2004-05-31 12:37:47.000000000 +0200
++++ gcc-3.4.4/gcc/c-incpath.c 2006-05-15 20:07:31.000000000 +0200
+@@ -328,6 +328,27 @@
+ else
+ heads[chain] = p;
+ tails[chain] = p;
++
++
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
+ }
+
+ /* Exported function to handle include chain merging, duplicate
diff --git a/packages/gcc/gcc-4.0.0/zecke-no-host-includes.patch b/packages/gcc/gcc-4.0.0/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..6afb10d6ef
--- /dev/null
+++ b/packages/gcc/gcc-4.0.0/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+
diff --git a/packages/gcc/gcc-4.0.2/zecke-no-host-includes.patch b/packages/gcc/gcc-4.0.2/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..6afb10d6ef
--- /dev/null
+++ b/packages/gcc/gcc-4.0.2/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+
diff --git a/packages/gcc/gcc-4.1-20060217/zecke-no-host-includes.patch b/packages/gcc/gcc-4.1-20060217/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..6afb10d6ef
--- /dev/null
+++ b/packages/gcc/gcc-4.1-20060217/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+
diff --git a/packages/gcc/gcc-4.1.0/zecke-no-host-includes.patch b/packages/gcc/gcc-4.1.0/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..6afb10d6ef
--- /dev/null
+++ b/packages/gcc/gcc-4.1.0/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+
diff --git a/packages/gcc/gcc-4.2-20060513/zecke-no-host-includes.patch b/packages/gcc/gcc-4.2-20060513/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..6afb10d6ef
--- /dev/null
+++ b/packages/gcc/gcc-4.2-20060513/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+
diff --git a/packages/gcc/gcc_3.4.4.bb b/packages/gcc/gcc_3.4.4.bb
index 5be603f2ca..2d04b0ed08 100644
--- a/packages/gcc/gcc_3.4.4.bb
+++ b/packages/gcc/gcc_3.4.4.bb
@@ -26,5 +26,6 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
SRC_URI += "file://gcc34-configure.in.patch;patch=1"
SRC_URI += "file://gcc34-thumb-support.patch;patch=1"
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
include gcc3-build.inc
diff --git a/packages/gcc/gcc_4.0.0.bb b/packages/gcc/gcc_4.0.0.bb
index cb7bfeae1c..af54c17fb8 100644
--- a/packages/gcc/gcc_4.0.0.bb
+++ b/packages/gcc/gcc_4.0.0.bb
@@ -11,5 +11,6 @@ include gcc-package.inc
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://ldflags.patch;patch=1"
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
include gcc4-build.inc
diff --git a/packages/gcc/gcc_4.0.2.bb b/packages/gcc/gcc_4.0.2.bb
index 540af1cb39..7a8eba47ee 100644
--- a/packages/gcc/gcc_4.0.2.bb
+++ b/packages/gcc/gcc_4.0.2.bb
@@ -23,5 +23,7 @@ SRC_URI_append = " file://100-uclibc-conf.patch;patch=1 \
file://800-arm-bigendian.patch;patch=1 \
file://zecke-host-cpp-ac-hack.patch;patch=1 "
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
include gcc4-build.inc
diff --git a/packages/gcc/gcc_4.1-20060217.bb b/packages/gcc/gcc_4.1-20060217.bb
index da2c80782d..66880d752b 100644
--- a/packages/gcc/gcc_4.1-20060217.bb
+++ b/packages/gcc/gcc_4.1-20060217.bb
@@ -14,4 +14,6 @@ SRC_URI = "http://ftp.nluug.nl/languages/gcc/snapshots/4.1-20060217/gcc-4.1-2006
file://arm-softfloat.patch;patch=1 \
file://ldflags.patch;patch=1"
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
include gcc4-build.inc
diff --git a/packages/gcc/gcc_4.1.0.bb b/packages/gcc/gcc_4.1.0.bb
index 27f6870d23..4d44978dab 100644
--- a/packages/gcc/gcc_4.1.0.bb
+++ b/packages/gcc/gcc_4.1.0.bb
@@ -14,6 +14,8 @@ SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.0/gcc-4.1.0.tar.bz2 \
file://arm-softfloat.patch;patch=1 \
file://ldflags.patch;patch=1"
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
include gcc4-build.inc
EXTRA_OECONF += "--disable-libssp"
diff --git a/packages/gcc/gcc_4.2-20060513.bb b/packages/gcc/gcc_4.2-20060513.bb
index 9eb54654da..68fa6d8d06 100644
--- a/packages/gcc/gcc_4.2-20060513.bb
+++ b/packages/gcc/gcc_4.2-20060513.bb
@@ -14,6 +14,8 @@ SRC_URI = "http://ftp.nluug.nl/languages/gcc/snapshots/${PV}/gcc-${PV}.tar.bz2 \
file://arm-softfloat.patch;patch=1 \
file://ldflags.patch;patch=1"
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
include gcc4-build.inc
EXTRA_OECONF += "--disable-libssp"