diff options
author | Holger Freyther <zecke@selfish.org> | 2006-05-16 21:36:28 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-05-16 21:36:28 +0000 |
commit | 619b8e49c6e6e82e7e9e227c00bc5d34f1328789 (patch) | |
tree | e1a445820260c119b9ed5b749b5169b11b3bfecf | |
parent | 487930053e7f2d515c80e6d7de0e4cb4705e96b0 (diff) |
packages/gcc:
Hack to make me rich and famous. Patch versions 3.4.4,
4.0.0, 4.0.2, 4.1.0, 4.1.0-snapshot, 4.2-snapshot and
activate the hack when cross compiling.
gcc will abort if you call it with -I/usr/include or
-I/opt/include or -I/sw/include.
Apply the patch when fail-fast is in the OVERRIDES
-rw-r--r-- | packages/gcc/gcc-3.4.4/zecke-no-host-includes.patch | 32 | ||||
-rw-r--r-- | packages/gcc/gcc-4.0.0/zecke-no-host-includes.patch | 31 | ||||
-rw-r--r-- | packages/gcc/gcc-4.0.2/zecke-no-host-includes.patch | 31 | ||||
-rw-r--r-- | packages/gcc/gcc-4.1-20060217/zecke-no-host-includes.patch | 31 | ||||
-rw-r--r-- | packages/gcc/gcc-4.1.0/zecke-no-host-includes.patch | 31 | ||||
-rw-r--r-- | packages/gcc/gcc-4.2-20060513/zecke-no-host-includes.patch | 31 | ||||
-rw-r--r-- | packages/gcc/gcc_3.4.4.bb | 1 | ||||
-rw-r--r-- | packages/gcc/gcc_4.0.0.bb | 1 | ||||
-rw-r--r-- | packages/gcc/gcc_4.0.2.bb | 2 | ||||
-rw-r--r-- | packages/gcc/gcc_4.1-20060217.bb | 2 | ||||
-rw-r--r-- | packages/gcc/gcc_4.1.0.bb | 2 | ||||
-rw-r--r-- | packages/gcc/gcc_4.2-20060513.bb | 2 |
12 files changed, 197 insertions, 0 deletions
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" |