guix-commits
[Top][All Lists]
Advanced

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

63/192: gnu: binutils-boot: Update to 2.10.1.


From: Jan Nieuwenhuizen
Subject: 63/192: gnu: binutils-boot: Update to 2.10.1.
Date: Mon, 3 Sep 2018 16:24:52 -0400 (EDT)

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

commit 42ba6daa6f99ad32c7d1fa044b34c855282b4ca8
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Wed Jun 6 14:45:55 2018 +0200

    gnu: binutils-boot: Update to 2.10.1.
    
    * gnu/packages/mes.scm (binutils-boot): Update to 2.10.1.
    * gnu/packages/patches/binutils-boot.patch: Remove.
    * gnu/packages/patches/binutils-boot-2.10.1.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Rename it.
---
 gnu/local.mk                                    |   2 +-
 gnu/packages/mes.scm                            |  54 ++++---
 gnu/packages/patches/binutils-boot-2.10.1.patch |  23 +++
 gnu/packages/patches/binutils-boot.patch        | 207 ------------------------
 4 files changed, 55 insertions(+), 231 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 502413f..c0153d0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -594,7 +594,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/bazaar-CVE-2017-14176.patch             \
   %D%/packages/patches/beignet-correct-file-names.patch                \
   %D%/packages/patches/binutils-aarch64-symbol-relocation.patch        \
-  %D%/packages/patches/binutils-boot.patch                     \
+  %D%/packages/patches/binutils-boot-2.10.1.patch              \
   %D%/packages/patches/binutils-loongson-workaround.patch      \
   %D%/packages/patches/blast+-fix-makefile.patch               \
   %D%/packages/patches/boost-fix-icu-build.patch               \
diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 494f4fb..29f5daa 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -24,6 +24,7 @@
   #:use-module (gnu packages bootstrap)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages guile)
@@ -544,51 +545,58 @@ standard.")
   (package
     (inherit binutils)
     (name "binutils-boot")
-    (version "2.5.1")
+    (version "2.10.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append 
"https://gcc.gnu.org/pub/binutils/old-releases/binutils-";
-                                  version ".tar.bz2"))
-              (patches (search-patches "binutils-boot.patch"))
+              (uri (string-append "mirror://gnu/binutils/binutils-"
+                                  version ".tar.gz"))
+              (patches (search-patches "binutils-boot-2.10.1.patch"))
               (sha256
                (base32
-                "0nbhihxikyj5zg4fkf9gqx9b2rd1s47pid30rk8z8dvkvgpbmsin"))))
+                "1dgaabcap8d5r0j7fg7jvw9j2p0aqyw12k3mlp4d85rcdbhh1cwl"))))
     (supported-systems '("i686-linux"))
-    (native-inputs `(("mes" ,mes-boot)
+    (native-inputs `(("flex" ,flex) ; MORTAL SIN HERE
+                     ("mes" ,mes-boot)
                      ("tcc" ,tcc-boot)))
     (arguments
      `(#:tests? #f                      ; runtest: command not found
+       #:parallel-build? #f
        #:strip-binaries? #f
-       #:make-flags '("CC=tcc -static -DANSI_PROTOTYPES=1"
-                      "AR=tcc -ar"
-                      "RANLIB=true")
-       #:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-1))
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
+             (let ((out (assoc-ref outputs "out"))
+                   (cppflags "-D __STDC__=1 -D __GLIBC_MINOR__=6"))
+               (unsetenv "C_INCLUDE_PATH") ; flex
+               (unsetenv "LIBRARY_PATH")
                (setenv "CONFIG_SHELL" (string-append
                                        (assoc-ref %build-inputs "bash")
                                        "/bin/sh"))
-               (setenv "CPPFLAGS" "-D ANSI_PROTOTYPES=1")
+               (setenv "CPPFLAGS" cppflags)
                (setenv "AR" "tcc -ar")
                (setenv "RANLIB" "true")
-               (setenv "CC" "tcc -static -D ANSI_PROTOTYPES=1")
-               (setenv "CPP" "tcc -E -D ANSI_PROTOTYPES=1")
+               (setenv "CC" (string-append "tcc -static" " " cppflags))
+               (setenv "CPP" (string-append "tcc -E" " " cppflags))
+               (and
+                (zero?
+                 (system* "./configure"
+                            "--disable-shared"
+                            "--enable-static"
+                            "--host=i386-unknown-linux"
+                            "--target=i386-unknown-linux"
+                            (string-append "--prefix=" out))))))))))))
+               (setenv "RANLIB" "true")
+               (setenv "CC" (string-append "tcc -static" " " cppflags))
+               (setenv "CPP" (string-append "tcc -E" " " cppflags))
                (and
                 (zero?
                  (system* "./configure"
-                          "--host=i386-unknown-linux"
-                          "--target=i386-unknown-linux"
-                          (string-append "--prefix=" out)))
-                (with-directory-excursion "gas"
-                  (zero?
-                   (system* "./configure"
+                            "--disable-shared"
+                            "--enable-static"
                             "--host=i386-unknown-linux"
-                            "--target=i386-unknown-linux"))))))))))))
+                            "--target=i386-unknown-linux"
+                            (string-append "--prefix=" out))))))))))))
 
 (define-public gcc-boot
   (package
diff --git a/gnu/packages/patches/binutils-boot-2.10.1.patch 
b/gnu/packages/patches/binutils-boot-2.10.1.patch
new file mode 100644
index 0000000..5fba3ac
--- /dev/null
+++ b/gnu/packages/patches/binutils-boot-2.10.1.patch
@@ -0,0 +1,23 @@
+Binary files ../binutils-2.10.1/if30640 and binutils-2.10.1/if30640 differ
+diff -purN -x config.status -x config.h -x BOOT 
../binutils-2.10.1/intl/localealias.c binutils-2.10.1/intl/localealias.c
+--- ../binutils-2.10.1/intl/localealias.c      1999-05-03 09:29:05.000000000 
+0200
++++ binutils-2.10.1/intl/localealias.c 2018-06-06 06:52:48.434644103 +0200
+@@ -21,6 +21,7 @@
+ #endif
+ 
+ #include <ctype.h>
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+ 
+diff -purN -x config.status -x config.h -x BOOT ../binutils-2.10.1/ltmain.sh 
binutils-2.10.1/ltmain.sh
+--- ../binutils-2.10.1/ltmain.sh       2000-02-27 17:46:19.000000000 +0100
++++ binutils-2.10.1/ltmain.sh  2018-06-06 08:04:17.434957529 +0200
+@@ -874,6 +874,7 @@ compiler."
+     temp_rpath=
+     thread_safe=no
+     vinfo=
++    link_static_flag=-static
+ 
+     # We need to know -static, to get the right output filenames.
+     for arg
diff --git a/gnu/packages/patches/binutils-boot.patch 
b/gnu/packages/patches/binutils-boot.patch
deleted file mode 100644
index fc235a5..0000000
--- a/gnu/packages/patches/binutils-boot.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-diff -purN -x BOOT ../binutils-2.5.1/bfd/elfcode.h binutils-2.5.1/bfd/elfcode.h
---- ../binutils-2.5.1/bfd/elfcode.h    1994-10-22 02:28:00.000000000 +0100
-+++ binutils-2.5.1/bfd/elfcode.h       2018-05-31 18:16:42.317716523 +0200
-@@ -430,8 +430,7 @@ elf_swap_dyn_out (abfd, src, dst)
- /* String table creation/manipulation routines */
- 
- static struct strtab *
--bfd_new_strtab (abfd)
--     bfd *abfd;
-+bfd_new_strtab ()
- {
-   struct strtab *ss;
- 
-diff -purN -x BOOT ../binutils-2.5.1/binutils/bucomm.c 
binutils-2.5.1/binutils/bucomm.c
---- ../binutils-2.5.1/binutils/bucomm.c        1994-09-16 06:03:34.000000000 
+0200
-+++ binutils-2.5.1/binutils/bucomm.c   2018-05-31 18:19:33.880540023 +0200
-@@ -31,6 +31,8 @@
- #include <varargs.h>
- #endif
- 
-+#include <time.h>
-+
- char *target = NULL;          /* default as late as possible */
- 
- /* Error reporting */
-diff -purN -x BOOT ../binutils-2.5.1/gas/configure binutils-2.5.1/gas/configure
---- ../binutils-2.5.1/gas/configure    1994-10-21 23:06:58.000000000 +0100
-+++ binutils-2.5.1/gas/configure       2018-06-04 18:50:02.753645522 +0200
-@@ -383,7 +383,7 @@ fi
- 
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
--ac_cpp='$CPP $CPPFLAGS'
-+ac_cpp="$CPP $CPPFLAGS"
- ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest 
$LIBS 1>&5 2>&5'
- 
- if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-diff -purN -x BOOT ../binutils-2.5.1/gas/Makefile.in 
binutils-2.5.1/gas/Makefile.in
---- ../binutils-2.5.1/gas/Makefile.in  1994-10-22 11:47:53.000000000 +0100
-+++ binutils-2.5.1/gas/Makefile.in     2018-06-01 07:15:33.129518156 +0200
-@@ -372,7 +372,7 @@ input-file.o : input-file.c as.h \
-    targ-env.h obj-format.h targ-cpu.h \
-    struc-symbol.h write.h flonum.h bignum.h expr.h \
-   frags.h hash.h read.h symbols.h tc.h obj.h input-file.h 
--input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \
-+input-scrub.o : input-scrub.c \
-   as.h targ-env.h obj-format.h \
-   targ-cpu.h  struc-symbol.h \
-   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h 
\
-diff -purN -x BOOT ../binutils-2.5.1/gprof/gprof.c binutils-2.5.1/gprof/gprof.c
---- ../binutils-2.5.1/gprof/gprof.c    1994-08-30 17:15:09.000000000 +0200
-+++ binutils-2.5.1/gprof/gprof.c       2018-05-31 20:14:21.806637821 +0200
-@@ -339,7 +339,7 @@ gettextspace( abfd )
-     return;
-   }
- 
--  textspace = (u_char *) malloc( texsec->_cooked_size );
-+  textspace = (unsigned char *) malloc( texsec->_cooked_size );
- 
-   if ( textspace == 0 ) {
-     fprintf( stderr , "%s: ran out room for %d bytes of text space:  " ,
-diff -purN -x BOOT ../binutils-2.5.1/gprof/printgprof.c 
binutils-2.5.1/gprof/printgprof.c
---- ../binutils-2.5.1/gprof/printgprof.c       1994-10-22 00:00:12.000000000 
+0100
-+++ binutils-2.5.1/gprof/printgprof.c  2018-06-01 22:26:06.513709826 +0200
-@@ -760,6 +760,7 @@ printindex()
-     free( namesortnlp );
- }
- 
-+#if 0
- PTR
- xmalloc (size)
-      long size;
-@@ -784,4 +785,4 @@ xrealloc (oldval, size)
-     }
-     return val;
- }
--
-+#endif
-Binary files ../binutils-2.5.1/intl and binutils-2.5.1/intl differ
-diff -purN -x BOOT ../binutils-2.5.1/ld/ldmisc.c binutils-2.5.1/ld/ldmisc.c
---- ../binutils-2.5.1/ld/ldmisc.c      1994-09-15 19:07:07.000000000 +0200
-+++ binutils-2.5.1/ld/ldmisc.c 2018-06-01 21:39:38.354292903 +0200
-@@ -21,7 +21,11 @@ the Free Software Foundation, 675 Mass A
- 
- #include "bfd.h"
- #include "sysdep.h"
-+#ifdef ANSI_PROTOTYPES
-+#include <stdarg.h>
-+#else
- #include <varargs.h>
-+#endif
- #include <demangle.h>
- 
- #include "ld.h"
-@@ -340,6 +344,12 @@ vfinfo(fp, fmt, arg)
- /* (You would think this should be called just "info", but then you would
-    hosed by LynxOS, which defines that name in its libc.) */
- 
-+#ifdef ANSI_PROTOTYPES
-+void info_msg(char *fmt, ...)
-+{
-+  va_list arg;
-+  va_start (arg, fmt);
-+#else
- void info_msg(va_alist)
-      va_dcl
- {
-@@ -347,12 +357,19 @@ void info_msg(va_alist)
-   va_list arg;
-   va_start(arg);
-   fmt = va_arg(arg, char *);
-+#endif
-   vfinfo(stdout, fmt, arg);
-   va_end(arg);
- }
- 
- /* ('e' for error.) Format info message and print on stderr. */
- 
-+#ifdef ANSI_PROTOTYPES
-+void einfo(char *fmt, ...)
-+{
-+  va_list arg;
-+  va_start (arg, fmt);
-+#else
- void einfo(va_alist)
-      va_dcl
- {
-@@ -360,6 +377,7 @@ void einfo(va_alist)
-   va_list arg;
-   va_start(arg);
-   fmt = va_arg(arg, char *);
-+#endif
-   vfinfo(stderr, fmt, arg);
-   va_end(arg);
- }
-@@ -385,18 +403,34 @@ buystring (x)
- 
- /* ('m' for map) Format info message and print on map. */
- 
--void minfo(va_alist)
-+#ifdef ANSI_PROTOTYPES
-+void
-+minfo(char* fmt, ...)
-+{
-+  va_list arg;
-+  va_start (arg, fmt);
-+#else
-+void
-+minfo(va_alist)
-      va_dcl
- {
-   char *fmt;
-   va_list arg;
-   va_start(arg);
-   fmt = va_arg(arg, char *);
-+#endif
-   vfinfo(config.map_file, fmt, arg);
-   va_end(arg);
- }
- 
- 
-+#ifdef ANSI_PROTOTYPES
-+static void
-+finfo (char *fmt, FILE *file, ...)
-+{
-+  va_list arg;
-+  va_start (arg, file);
-+#else
- static void
- finfo (va_alist)
-      va_dcl
-@@ -407,6 +441,7 @@ finfo (va_alist)
-   va_start (arg);
-   file = va_arg (arg, FILE *);
-   fmt = va_arg (arg, char *);
-+#endif
-   vfinfo (file, fmt, arg);
-   va_end (arg);
- }
-diff -purN -x BOOT ../binutils-2.5.1/libiberty/functions.def 
binutils-2.5.1/libiberty/functions.def
---- ../binutils-2.5.1/libiberty/functions.def  1994-10-12 01:50:12.000000000 
+0100
-+++ binutils-2.5.1/libiberty/functions.def     2018-05-31 21:08:56.576212413 
+0200
-@@ -16,7 +16,7 @@ DEF(clock, clock_t, (), NOTHING)
- DEF(getopt, int, (argc, argv, optstring),
-       int argc AND char **argv AND CONST char *optstring)     
- DEF(getpagesize, int , (), NOTHING)
--DEF(getcwd, char*, (buf, len), char *buf AND int len)
-+DEF(getcwd, char*, (buf, len), char *buf AND size_t len)
- DEF(index, char*, (s, c), char *s AND int c)
- DEF(insque, void, (), NOTHING)
- DEF(memchr, PTR, (s, c, length), CONST PTR s AND int c AND size_t length)
-diff -purN -x BOOT ../binutils-2.5.1/libiberty/vasprintf.c 
binutils-2.5.1/libiberty/vasprintf.c
---- ../binutils-2.5.1/libiberty/vasprintf.c    1994-08-24 23:10:21.000000000 
+0200
-+++ binutils-2.5.1/libiberty/vasprintf.c       2018-05-31 18:18:55.491908205 
+0200
-@@ -20,7 +20,12 @@ Cambridge, MA 02139, USA.  */
- 
- #include <stdio.h>
- #include <string.h>
-+
-+#ifdef ANSI_PROTOTYPES
-+#include <stdarg.h>
-+#else
- #include <varargs.h>
-+#endif
- 
- #ifdef TEST
- int global_total_width;



reply via email to

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