| 1 | This patch enables building gcc-4.6.4 using gcc-2.95.3 and glibc-2.2.5
|
| 2 |
|
| 3 | * Tweak Makefile to allow overriding NATIVE_SYSTEM_HEADER_DIR using #:makeflags
|
| 4 | * Add missing limits.h include.
|
| 5 | * Add SSIZE_MAX define. The SSIZE_MAX define has been added to Mes
|
| 6 | upstream and can be removed with the next Mes release.
|
| 7 | * Remove -fbuilding-libgcc flag, it assumes features being present from a
|
| 8 | newer gcc or glibc.
|
| 9 | * [MES_BOOTSTRAP_GCC]: Disable threads harder.
|
| 10 |
|
| 11 | Upstream status: not presented upstream.
|
| 12 |
|
| 13 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in
|
| 14 | index f3cc49fdb18..bc5718fc9a6 100644
|
| 15 | |
| 16 | |
| 17 | @@ -440,7 +440,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h
|
| 18 | LTO_SYMTAB_H = $(srcdir)/../include/lto-symtab.h
|
| 19 |
|
| 20 | # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
| 21 | -NATIVE_SYSTEM_HEADER_DIR = /usr/include
|
| 22 | +# NATIVE_SYSTEM_HEADER_DIR = /usr/include
|
| 23 | # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
| 24 | CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
| 25 |
|
| 26 | diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c
|
| 27 | index 94b7a0b89a7..ab2baab55ca 100644
|
| 28 | |
| 29 | |
| 30 | @@ -23,6 +23,12 @@
|
| 31 | #include "hosthooks.h"
|
| 32 | #include "hosthooks-def.h"
|
| 33 |
|
| 34 | +// ../.././gcc/config/host-linux.c:213: `SSIZE_MAX' undeclared (first
|
| 35 | +// use in this function)
|
| 36 | +#include <limits.h>
|
| 37 | +#ifndef SSIZE_MAX
|
| 38 | +# define SSIZE_MAX LONG_MAX
|
| 39 | +#endif
|
| 40 |
|
| 41 | /* Linux has a feature called exec-shield-randomize that perturbs the
|
| 42 | address of non-fixed mapped segments by a (relatively) small amount.
|
| 43 | diff --git a/libgcc/generic-morestack-thread.c b/libgcc/generic-morestack-thread.c
|
| 44 | index bbe6dd12b5a..1d1d48223d7 100644
|
| 45 | |
| 46 | |
| 47 | @@ -34,7 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
| 48 | will want to define inhibit_libc while building a compiler which
|
| 49 | can build glibc. */
|
| 50 |
|
| 51 | -#ifndef inhibit_libc
|
| 52 | +#if 0 //!defined (inhibit_libc) && !MES_BOOTSTRAP_GCC
|
| 53 |
|
| 54 | #include <errno.h>
|
| 55 | #include <pthread.h>
|