[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/07: bootstrap: cleanup, document patches WIP
From: |
Jan Nieuwenhuizen |
Subject: |
03/07: bootstrap: cleanup, document patches WIP |
Date: |
Tue, 18 Sep 2018 04:56:43 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 1ff9fe007e6a3fb3e593a5c48ad990da483fe68d
Author: Jan Nieuwenhuizen <address@hidden>
Date: Tue Sep 18 07:21:32 2018 +0200
bootstrap: cleanup, document patches WIP
---
gnu/packages/commencement.scm | 6 +++---
gnu/packages/patches/binutils-boot-2.20.1a.patch | 1 +
gnu/packages/patches/gcc-boot-2.95.3.patch | 26 +++++++++++++++++++-----
3 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 57a0879..4bc190e 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -743,9 +743,9 @@
"--host=i686-unknown-linux-gnu"
,(string-append "--prefix=" out)))
#:make-flags (list
- "CC=tcc -static -D __GLIBC_MINOR__=6"
- "OLDCC=tcc -static -D __GLIBC_MINOR__=6"
- "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6"
+ "CC=tcc -static -D __GLIBC_MINOR__=6 -D MES_BOOTSTRAP=1"
+ "OLDCC=tcc -static -D __GLIBC_MINOR__=6 -D
MES_BOOTSTRAP=1"
+ "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6 -D
MES_BOOTSTRAP=1"
"AR=ar"
"RANLIB=ranlib"
(string-append "LIBGCC2_INCLUDES=-I "
diff --git a/gnu/packages/patches/binutils-boot-2.20.1a.patch
b/gnu/packages/patches/binutils-boot-2.20.1a.patch
index 0dd0c8f..0740a00 100644
--- a/gnu/packages/patches/binutils-boot-2.20.1a.patch
+++ b/gnu/packages/patches/binutils-boot-2.20.1a.patch
@@ -7,6 +7,7 @@ This patch enables building binutils using TCC and Mes C Library
* remove a C99'ism of mixing code and variable declaration
* [MES_BOOTSTRAP]: remove strncmp to avoid duplicat symbol
+Upstream status: Not presented to upstream.
diff -purN -x config.status -x config.h -x BOOT
../binutils-2.20.1a/bfd/elfcode.h binutils-2.20.1a/bfd/elfcode.h
--- ../binutils-2.20.1a/bfd/elfcode.h 2009-09-10 13:47:12.000000000 +0200
diff --git a/gnu/packages/patches/gcc-boot-2.95.3.patch
b/gnu/packages/patches/gcc-boot-2.95.3.patch
index b1fe01c..aa94eba 100644
--- a/gnu/packages/patches/gcc-boot-2.95.3.patch
+++ b/gnu/packages/patches/gcc-boot-2.95.3.patch
@@ -1,3 +1,17 @@
+This patch enables building gcc-2.95.3 using TCC and Mes C Library.
+
+ * Disable building DOC
+ * Avoid running `fixproto'.
+ * Force running `fixinc'.
+ * Add missing defines: FIRST_PSEUDO_REGISTER, PROTO
+ * Add mysteriously missing declarations in libgcc2.c
+ * Disable usage of "fflush (); exit ()", that breaks with Mes C Library.
+ * Replace Makefile trickery of creating an libgcc1.a archive, then
+ extracting the .o files later to create a new libgcc2.a archive.
+ Instead, keep temporary .o files.
+
+Upstream status: Not presented to upstream.
+
diff -purN -x foo.c -x BOOT -x BOOT-2 -x BOOT-strict -x .git -x Makefile -x
config.status -x config.h -x BOOT -x BOOT-GCC ../gcc-2.95.3/gcc/crtstuff.c
gcc-2.95.3/gcc/crtstuff.c
--- ../gcc-2.95.3/gcc/crtstuff.c 1999-03-23 01:43:51.000000000 +0100
+++ gcc-2.95.3/gcc/crtstuff.c 2018-06-19 19:52:06.151175995 +0200
@@ -21,7 +35,7 @@ diff -purN -x foo.c -x BOOT -x BOOT-2 -x BOOT-strict -x .git
-x Makefile -x conf
printf("#define ATTR_FLAG_unlikely\t0x10\n");
printf("#define ATTR_FLAG_very_unlikely\t0x20\n");
-+#if 0
++#if !MES_BOOTSTRAP
fflush (stdout);
exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
+#else
@@ -37,7 +51,7 @@ diff -purN -x foo.c -x BOOT -x BOOT-2 -x BOOT-strict -x .git
-x Makefile -x conf
printf ("#endif /* MAX_INSN_CODE */\n");
-+#if 0
++#if !MES_BOOTSTRAP
fflush (stdout);
exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
+#else
@@ -53,7 +67,7 @@ diff -purN -x foo.c -x BOOT -x BOOT-2 -x BOOT-strict -x .git
-x Makefile -x conf
if (have_lo_sum_flag)
printf ("#define HAVE_lo_sum\n");
-+#if 0
++#if !MES_BOOTSTRAP
fflush (stdout);
exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
+#else
@@ -69,7 +83,7 @@ diff -purN -x foo.c -x BOOT -x BOOT-2 -x BOOT-strict -x .git
-x Makefile -x conf
printf ("#endif /* NO_MD_PROTOTYPES */\n");
-+#if 0
++#if !MES_BOOTSTRAP
fflush (stdout);
exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
+#else
@@ -81,10 +95,11 @@ diff -purN -x foo.c -x BOOT -x BOOT-2 -x BOOT-strict -x
.git -x Makefile -x conf
diff -purN -x foo.c -x BOOT -x BOOT-2 -x BOOT-strict -x .git -x Makefile -x
config.status -x config.h -x BOOT -x BOOT-GCC ../gcc-2.95.3/gcc/libgcc2.c
gcc-2.95.3/gcc/libgcc2.c
--- ../gcc-2.95.3/gcc/libgcc2.c 1999-06-11 05:11:43.000000000 +0200
+++ gcc-2.95.3/gcc/libgcc2.c 2018-06-19 19:52:06.151175995 +0200
-@@ -48,6 +48,43 @@ Boston, MA 02111-1307, USA. */
+@@ -48,6 +48,45 @@ Boston, MA 02111-1307, USA. */
#include <stddef.h>
#endif
++#if 0
+/*
+ mysteriously missing decls
+*/
@@ -122,6 +137,7 @@ diff -purN -x foo.c -x BOOT -x BOOT-2 -x BOOT-strict -x
.git -x Makefile -x conf
+typedef int *FILE;
+#endif
+
++#endif // mystery
/* Don't use `fancy_abort' here even if config.h says to use it. */
#ifdef abort
#undef abort
- branch wip-bootstrap updated (2e0ae3f -> ac4c0b1), Jan Nieuwenhuizen, 2018/09/18
- 01/07: patch: doc, Jan Nieuwenhuizen, 2018/09/18
- 02/07: patch doc, Jan Nieuwenhuizen, 2018/09/18
- 05/07: bootstrap: tcc update WIP, Jan Nieuwenhuizen, 2018/09/18
- 03/07: bootstrap: cleanup, document patches WIP,
Jan Nieuwenhuizen <=
- 04/07: patch, Jan Nieuwenhuizen, 2018/09/18
- 07/07: patch: WIP., Jan Nieuwenhuizen, 2018/09/18
- 06/07: patch: wip, Jan Nieuwenhuizen, 2018/09/18