This patch enables building gcc-4.6.4 using gcc-2.95.3 and glibc-2.2.5 * Tweak Makefile to allow overriding NATIVE_SYSTEM_HEADER_DIR using #:makeflags * Add missing limits.h include. * Add SSIZE_MAX define. The SSIZE_MAX define has been added to Mes upstream and can be removed with the next Mes release. * Remove -fbuilding-libgcc flag, it assumes features being present from a newer gcc or glibc. * [MES_BOOTSTRAP_GCC]: Disable threads harder. Upstream status: not presented upstream. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f3cc49fdb18..bc5718fc9a6 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -440,7 +440,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h LTO_SYMTAB_H = $(srcdir)/../include/lto-symtab.h # Default native SYSTEM_HEADER_DIR, to be overridden by targets. -NATIVE_SYSTEM_HEADER_DIR = /usr/include +# NATIVE_SYSTEM_HEADER_DIR = /usr/include # Default cross SYSTEM_HEADER_DIR, to be overridden by targets. CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c index 94b7a0b89a7..ab2baab55ca 100644 --- a/gcc/config/host-linux.c +++ b/gcc/config/host-linux.c @@ -23,6 +23,12 @@ #include "hosthooks.h" #include "hosthooks-def.h" +// ../.././gcc/config/host-linux.c:213: `SSIZE_MAX' undeclared (first +// use in this function) +#include +#ifndef SSIZE_MAX +# define SSIZE_MAX LONG_MAX +#endif /* Linux has a feature called exec-shield-randomize that perturbs the address of non-fixed mapped segments by a (relatively) small amount. diff --git a/libgcc/generic-morestack-thread.c b/libgcc/generic-morestack-thread.c index bbe6dd12b5a..1d1d48223d7 100644 --- a/libgcc/generic-morestack-thread.c +++ b/libgcc/generic-morestack-thread.c @@ -34,7 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see will want to define inhibit_libc while building a compiler which can build glibc. */ -#ifndef inhibit_libc +#if 0 //!defined (inhibit_libc) && !MES_BOOTSTRAP_GCC #include #include from Nix (see the manual for details.) Nix was initially written by Eelco Dolstra; other people have been contributing to it. See `nix/AUTHORS' for details. The list of GNU Guix contributors is now generated from the output of 'git log' and written to this file, as can be seen in release tarballs. .scm?id=a5b2474037d749f42a816c60f0393941ba97444e'>gnu: Consolidate duplicate copyright names....Greg Hogan 2021-09-04gnu: libglvnd: Update to 1.3.4....Tobias Geerinckx-Rice 2021-07-27gnu: mesa-opencl-icd: Use absolute path for the library....Ivan Gankevich 2021-05-01gnu: libglvnd: Update to 1.3.3....Tobias Geerinckx-Rice 2021-04-15gnu: mesa: Add powerpc64le-linux support....Efraim Flashner 2021-04-11gnu: glfw: Update to 3.3.4....Tobias Geerinckx-Rice 2021-04-10gnu: libglvnd: Fix typo in description....Tobias Geerinckx-Rice 2021-03-15gnu: guile-opengl: Fix linking with libGL.so....Ricardo Wurmus 2021-03-04gnu: glfw: Update to 3.3.3....Tobias Geerinckx-Rice