diff options
author | Jan Nieuwenhuizen <janneke@gnu.org> | 2018-09-09 14:52:00 +0200 |
---|---|---|
committer | Jan Nieuwenhuizen <janneke@gnu.org> | 2018-09-23 09:46:26 +0200 |
commit | 0b652851b187dd0451c221f6dc173afbd7a555f4 (patch) | |
tree | ee08319e9732718e7b8c477f3bcd01b5cdd8f4b7 /gnu/packages/patches/gcc-boot-4.7.4.patch | |
parent | aec77e869571347863043fdf09c3aeecd28f3682 (diff) | |
download | guix-0b652851b187dd0451c221f6dc173afbd7a555f4.tar.gz |
bootstrap: Add Mes bootstrap.
* gnu/packages/patches/mes-nyacc-0.86.0.patch: Support bootstrap build. * gnu/packages/commencement.scm (%fake-bootstrap mes-boot0, mescc-tools-boot, nyacc-boot, mes-boot, tcc-boot0, tcc-boot, make-mesboot0, diffutils-mesboot, binutils-mesboot0, gcc-core-mesboot, mesboot-headers, glibc-mesboot0, gcc-mesboot0, binutils-mesboot, make-mesboot, gmp-boot, mpfr-boot, mpc-boot, gcc-mesboot1, gcc-mesboot1-wrapper, glibc-headers-mesboot, glibc-mesboot, gcc-mesboot, gcc-mesboot-wrapper, m4-mesboot): New variable. * gnu/packages/patches/binutils-boot-2.20.1a.patch: New file. New file. * gnu/packages/patches/gcc-boot-2.95.3.patch: New file. * gnu/packages/patches/gcc-boot-4.7.4.patch: New file. * gnu/packages/patches/glibc-boot-2.16.0.patch: New file. * gnu/packages/patches/glibc-boot-2.2.5.patch: New file. * gnu/packages/patches/glibc-bootstrap-system-2.16.0.patch: New file. * gnu/packages/patches/tcc-boot-0.9.27.patch: New file. * gnu/local.mk (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches/gcc-boot-4.7.4.patch')
-rw-r--r-- | gnu/packages/patches/gcc-boot-4.7.4.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/gnu/packages/patches/gcc-boot-4.7.4.patch b/gnu/packages/patches/gcc-boot-4.7.4.patch new file mode 100644 index 0000000000..3e51e31fdf --- /dev/null +++ b/gnu/packages/patches/gcc-boot-4.7.4.patch @@ -0,0 +1,68 @@ +This patch enables building gcc-4.7.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 +@@ -458,7 +458,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 = @NATIVE_SYSTEM_HEADER_DIR@ ++# NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@ + # 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 <limits.h> ++#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/Makefile.in b/libgcc/Makefile.in +index c301ff03cae..f86318c3bd5 100644 +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -225,7 +225,7 @@ endif + LIBGCC2_DEBUG_CFLAGS = -g + LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \ + $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \ +- -fbuilding-libgcc -fno-stack-protector \ ++ -fno-stack-protector \ + $(INHIBIT_LIBC_CFLAGS) + + # Additional options to use when compiling libgcc2.a. +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 +@@ -35,7 +35,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 <errno.h> + #include <pthread.h> |