guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

77/176: Revert "gnu: gcc-boot: Update to 3.0."


From: Jan Nieuwenhuizen
Subject: 77/176: Revert "gnu: gcc-boot: Update to 3.0."
Date: Fri, 31 Aug 2018 11:20:17 -0400 (EDT)

janneke pushed a commit to branch wip-bootstrap
in repository guix.

commit 27c34977c46a931462a3258f3193bdd928369e37
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Jun 10 20:08:08 2018 +0200

    Revert "gnu: gcc-boot: Update to 3.0."
    
    This reverts commit 7b0900b0597e5cef85b377ab67c891d673bcafeb.
---
 gnu/local.mk                               |   2 +-
 gnu/packages/mes.scm                       |  40 ++++---
 gnu/packages/patches/gcc-boot-2.95.3.patch | 172 +++++++++++++++++++++++++++++
 gnu/packages/patches/gcc-boot-3.0.patch    |  37 -------
 4 files changed, 198 insertions(+), 53 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 18ed844..548a7ea 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -696,7 +696,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/gcc-arm-bug-71399.patch                 \
   %D%/packages/patches/gcc-arm-link-spec-fix.patch             \
   %D%/packages/patches/gcc-asan-missing-include.patch          \
-  %D%/packages/patches/gcc-boot-3.0.patch                      \
+  %D%/packages/patches/gcc-boot-2.95.3.patch                   \
   %D%/packages/patches/gcc-cross-environment-variables.patch   \
   %D%/packages/patches/gcc-fix-texi2pod.patch                  \
   %D%/packages/patches/gcc-4.8-libsanitizer-fix.patch          \
diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 6c95ad8..fe93a7e 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -595,16 +595,16 @@ standard.")
   (package
     (inherit gcc)
     (name "gcc-boot")
-    (version "3.0")
+    (version "2.95.3")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://gnu/gcc/gcc-3.0/gcc-core-"
+              (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-"
                                   version
                                   ".tar.gz"))
-              (patches (search-patches "gcc-boot-3.0.patch"))
+              (patches (search-patches "gcc-boot-2.95.3.patch"))
               (sha256
                (base32
-                "13x04j77h9jw7g74v41s7jvxb2n3nx0mdvg8cf3i2bm306mss5vk"))))
+                "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
     (supported-systems '("i686-linux"))
     (native-inputs `(("binutils" ,binutils-boot)
                      ("tcc" ,tcc-boot)))
@@ -656,17 +656,27 @@ ac_cv_c_float_format='IEEE (little-endian)'
                           "--host=i386-unknown-linux"
                           "--target=i386-unknown-linux"
                           (string-append "--prefix=" out)))))))
-         (replace 'build
-           (lambda* (#:key make-flags #:allow-other-keys)
-             (let ((tcc-boot (assoc-ref %build-inputs "tcc")))
-               ;; (system* "ar" "r" "libg.a"
-               ;;          (string-append tcc-boot "/lib/x86-mes-gcc/libg.o"))
-               (and (zero? (apply system* (cons "make" make-flags)))
-                    ;; (system* "make" "stage1" "LANGUAGES=c")
-                    ;; (zero? (system* "make" "CC=stage1/xgcc -Bstage1/"
-                    ;;                 (string-append "CFLAGS=-g -O -I" 
tcc-boot "/include")
-                    ;;                 "LANGUAGES=c"))
-                    )))))))))
+         (add-after 'install 'install2
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((tcc (assoc-ref %build-inputs "tcc"))
+                    (tcc-lib (string-append tcc "/lib/x86-mes-gcc"))
+                    (out (assoc-ref outputs "out"))
+                    (gcc-dir (string-append out 
"/lib/gcc-lib/i386-unknown-linux/2.95.3")))
+               (copy-file (string-append tcc-lib "/crt1.o")
+                          (string-append gcc-dir "/crt1.o"))
+               (with-output-to-file "crti.c" (lambda _ (display "")))
+               (system* "tcc" "-static" "-c" "crti.c")
+               (copy-file "crti.o" (string-append gcc-dir "/crti.o"))
+               (with-output-to-file "crtn.c" (lambda _ (display "")))
+               (system* "tcc" "-static" "-c" "crtn.c")
+               (copy-file "crtn.o" (string-append gcc-dir "/crtn.o"))
+               (system* "ar" "r" (string-append gcc-dir "/libc.a")
+                        (string-append tcc "/lib/x86-mes-gcc/libc+gnu.o"))
+               (system* "ar" "r" (string-append out "/lib/libc.a")
+                        (string-append tcc "/lib/x86-mes-gcc/libc+gnu.o"))
+               (system* "ls" "-ltrF" gcc-dir)
+               (copy-recursively (string-append tcc "/include")
+                                 (string-append out "/include"))))))))))
 
 ;;;
 
diff --git a/gnu/packages/patches/gcc-boot-2.95.3.patch 
b/gnu/packages/patches/gcc-boot-2.95.3.patch
new file mode 100644
index 0000000..27a39ed
--- /dev/null
+++ b/gnu/packages/patches/gcc-boot-2.95.3.patch
@@ -0,0 +1,172 @@
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x 
BOOT-GCC ../gcc-2.95.3/gcc/cccp.c gcc-2.95.3/gcc/cccp.c
+--- ../gcc-2.95.3/gcc/cccp.c   2001-01-25 15:03:00.000000000 +0100
++++ gcc-2.95.3/gcc/cccp.c      2018-06-07 23:58:30.485287991 +0200
+@@ -4448,7 +4448,9 @@ get_filename:
+     if (*fin == '>' && fin + 1 == limit) {
+       angle_brackets = 1;
+       /* If -I-, start with the first -I dir after the -I-.  */
++#if 0
+       search_start = first_bracket_include;
++#endif
+       break;
+     }
+     goto fail;
+diff -purN -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-07 23:16:09.671415411 +0200
+@@ -54,8 +54,12 @@ Boston, MA 02111-1307, USA.  */
+ #include "tm.h"
+ #include "defaults.h"
+ #include <stddef.h>
++
++#define FIRST_PSEUDO_REGISTER 17
++
+ #include "frame.h"
+ 
++
+ /* We do not want to add the weak attribute to the declarations of these
+    routines in frame.h because that will cause the definition of these
+    symbols to be weak as well.
+Binary files ../gcc-2.95.3/gcc/fixinc/crt1.o and gcc-2.95.3/gcc/fixinc/crt1.o 
differ
+Binary files ../gcc-2.95.3/gcc/fixinc/crti.o and gcc-2.95.3/gcc/fixinc/crti.o 
differ
+Binary files ../gcc-2.95.3/gcc/fixinc/crtn.o and gcc-2.95.3/gcc/fixinc/crtn.o 
differ
+diff -purN -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-07 23:16:09.671415411 +0200
+@@ -48,6 +48,43 @@ Boston, MA 02111-1307, USA.  */
+ #include <stddef.h>
+ #endif
+ 
++/*
++  mysteriously missing decls
++*/
++
++#ifndef stderr
++#define stderr 2
++#endif
++
++#ifndef BITS_PER_UNIT
++#define BITS_PER_UNIT 8
++#endif
++
++#ifndef LONG_MIN
++#define LONG_MIN -2147483648
++#endif
++
++#ifndef EOF
++#define EOF -1
++#endif
++
++#if __GNUC__
++// typedef unsigned short word_type;
++
++#if !defined (SIZE_T) && !defined (_SIZE_T) && !defined (__MES_SIZE_T)
++#define SIZE_T
++#define _SIZE_T
++typedef long unsigned int size_t;
++#endif
++
++#endif // __GNUC__
++
++#if !defined (_FILE_T) && !defined (__MES_FILE_T)
++#define FILE_T
++#define _FILE_T
++typedef int *FILE;
++#endif
++
+ /* Don't use `fancy_abort' here even if config.h says to use it.  */
+ #ifdef abort
+ #undef abort
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x 
BOOT-GCC ../gcc-2.95.3/gcc/machmode.h gcc-2.95.3/gcc/machmode.h
+--- ../gcc-2.95.3/gcc/machmode.h       1999-04-08 09:27:26.000000000 +0200
++++ gcc-2.95.3/gcc/machmode.h  2018-06-07 23:16:09.671415411 +0200
+@@ -21,6 +21,9 @@ Boston, MA 02111-1307, USA.  */
+ #ifndef HAVE_MACHINE_MODES
+ #define HAVE_MACHINE_MODES
+ 
++#undef PROTO
++#define PROTO(args) args
++
+ /* Strictly speaking, this isn't the proper place to include these 
definitions,
+    but this file is included by every GCC file. */
+ 
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x 
BOOT-GCC ../gcc-2.95.3/gcc/Makefile.in gcc-2.95.3/gcc/Makefile.in
+--- ../gcc-2.95.3/gcc/Makefile.in      2001-01-25 15:02:58.000000000 +0100
++++ gcc-2.95.3/gcc/Makefile.in 2018-06-07 23:16:09.671415411 +0200
+@@ -221,7 +221,7 @@ RANLIB_TEST_FOR_TARGET = \
+ SYSTEM_HEADER_DIR = /usr/include
+ 
+ # Control whether to run fixproto.
+-STMP_FIXPROTO = stmp-fixproto
++# STMP_FIXPROTO = stmp-fixproto
+ 
+ # Test to see whether <limits.h> exists in the system header files.
+ LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
+@@ -2093,14 +2093,18 @@ gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS)
+ # s-* so that mostlyclean does not force the include directory to
+ # be rebuilt.
+ 
++# STMP_FIXINC = @STMP_FIXINC@
++STMP_FIXINC = stmp-fixinc
++
+ # Build the include directory including float.h (which no longer depends upon
+ # enquire).
+-stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
++stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h
+ # Copy in the headers provided with gcc.
+ # The sed command gets just the last file name component;
+ # this is necessary because VPATH could add a dirname.
+ # Using basename would be simpler, but some systems don't have it.
+ # The touch command is here to workaround an AIX/Linux NFS bug.
++      -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; 
fi
+       for file in .. $(USER_H); do \
+         if [ X$$file != X.. ]; then \
+           realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
+@@ -2265,16 +2269,17 @@ stmp-fixproto: fixhdr.ready fixproto stm
+ #
+ # Remake the info files.
+ 
+-doc: info
+-info: cpp.info gcc.info lang.info
+-
+-cpp.info: $(srcdir)/cpp.texi
+-      $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi
+-
+-gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
+-        $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
+-        $(srcdir)/tm.texi $(srcdir)/gcov.texi
+-      $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi
++doc:
++# doc: info
++# info: cpp.info gcc.info lang.info
++
++# cpp.info: $(srcdir)/cpp.texi
++#     $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi
++
++# gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
++#       $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
++#       $(srcdir)/tm.texi $(srcdir)/gcov.texi
++#     $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi
+ 
+ dvi: gcc.dvi cpp.dvi lang.dvi
+ 
+Binary files ../gcc-2.95.3/intl and gcc-2.95.3/intl differ
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x 
BOOT-GCC ../gcc-2.95.3/test2.h gcc-2.95.3/test2.h
+--- ../gcc-2.95.3/test2.h      1970-01-01 01:00:00.000000000 +0100
++++ gcc-2.95.3/test2.h 2018-06-07 23:54:57.461766900 +0200
+@@ -0,0 +1 @@
++#warning test2.h
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x 
BOOT-GCC ../gcc-2.95.3/test3.h gcc-2.95.3/test3.h
+--- ../gcc-2.95.3/test3.h      1970-01-01 01:00:00.000000000 +0100
++++ gcc-2.95.3/test3.h 2018-06-07 23:54:57.461766900 +0200
+@@ -0,0 +1 @@
++#warning test3.h
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x 
BOOT-GCC ../gcc-2.95.3/test.c gcc-2.95.3/test.c
+--- ../gcc-2.95.3/test.c       1970-01-01 01:00:00.000000000 +0100
++++ gcc-2.95.3/test.c  2018-06-07 23:54:57.461766900 +0200
+@@ -0,0 +1,4 @@
++#warning 1:test.c
++#include "test2.h"
++#warning 3:test.c
++#include "test3.h"
+Binary files ../gcc-2.95.3/texinfo and gcc-2.95.3/texinfo differ
diff --git a/gnu/packages/patches/gcc-boot-3.0.patch 
b/gnu/packages/patches/gcc-boot-3.0.patch
deleted file mode 100644
index 868ed82..0000000
--- a/gnu/packages/patches/gcc-boot-3.0.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -purN -x config.status -x config.h -x BOOT ../gcc-3.0/gcc/config.gcc 
gcc-3.0/gcc/config.gcc
---- ../gcc-3.0/gcc/config.gcc  2001-06-05 21:09:51.000000000 +0200
-+++ gcc-3.0/gcc/config.gcc     2018-06-07 23:08:25.167767955 +0200
-@@ -1210,6 +1210,7 @@ i[34567]86-*-linux*)     # Intel 80386's run
-       tm_file="i386/i386.h i386/att.h linux.h i386/linux.h"
-       tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
-       extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
-+      extra_parts=""
-       gnu_ld=yes
-       float_format=i386
-       if test x$enable_threads = xyes; then
-diff -purN -x config.status -x config.h -x BOOT ../gcc-3.0/gcc/Makefile.in 
gcc-3.0/gcc/Makefile.in
---- ../gcc-3.0/gcc/Makefile.in 2001-06-13 07:05:35.000000000 +0200
-+++ gcc-3.0/gcc/Makefile.in    2018-06-07 17:14:44.405516220 +0200
-@@ -263,8 +263,8 @@ SPLAY_TREE_H= $(srcdir)/../include/splay
- CROSS_SYSTEM_HEADER_DIR = $(tooldir)/sys-include
- 
- # Control whether to run fixproto and fixincludes.
--STMP_FIXPROTO = stmp-fixproto
--STMP_FIXINC = stmp-fixinc
-+STMP_FIXPROTO = #stmp-fixproto
-+STMP_FIXINC = # stmp-fixinc
- 
- # Test to see whether <limits.h> exists in the system header files.
- LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
-diff -purN -x config.status -x config.h -x BOOT ../gcc-3.0/gcc/timevar.c 
gcc-3.0/gcc/timevar.c
---- ../gcc-3.0/gcc/timevar.c   2001-03-02 20:51:59.000000000 +0100
-+++ gcc-3.0/gcc/timevar.c      2018-06-07 10:39:37.795395232 +0200
-@@ -27,6 +27,8 @@
- # include <sys/times.h>
- #endif
- 
-+#include <sys/resource.h>
-+
- #ifdef HAVE_SYS_RESOURCE_H
- #include <sys/resource.h>
- #endif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]