janneke pushed a commit to branch wip-bootstrap in repository guix. commit 37a76455f6d38b07467476f191cbcc6c9c72de6e Author: Jan Nieuwenhuizen <jann...@gnu.org> Date: Sun Jun 10 10:38:41 2018 +0200
Revert "gnu: binutils-boot: Update to 2.30." This reverts commit 68bc804acd319dc9d88d2c02353bf99380394abe. --- gnu/packages/mes.scm | 6 +- gnu/packages/patches/binutils-boot-2.30.patch | 282 -------------------------- 2 files changed, 3 insertions(+), 285 deletions(-) diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index a83a8f6..41fbcf8 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -545,15 +545,15 @@ standard.") (package (inherit binutils) (name "binutils-boot") - (version "2.30") + (version "2.25") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/binutils/binutils-" version ".tar.gz")) - (patches (search-patches "binutils-boot-2.30.patch")) + (patches (search-patches "binutils-boot-2.25.patch")) (sha256 (base32 - "1sp9g7zrrcsl25hxiqzmmcrdlbm7rbmj0vki18lks28wblcm0f4c")))) + "0b9gj330zjv5hby6kgf1nda5ca7pp3z1ips6dykm46mld1qkgkyc")))) (supported-systems '("i686-linux")) (native-inputs `(("flex" ,flex) ; MORTAL SIN HERE ("mes" ,mes-boot) diff --git a/gnu/packages/patches/binutils-boot-2.30.patch b/gnu/packages/patches/binutils-boot-2.30.patch deleted file mode 100644 index 80028a4..0000000 --- a/gnu/packages/patches/binutils-boot-2.30.patch +++ /dev/null @@ -1,282 +0,0 @@ -libiberty/md5.c does not compile with our (patched) tcc-0.9.26, -so we use md5.c from binutils-2.14 - -tcc-0.9.27 is known to compile that file, this md5.c patch can be -removed after upgrading tcc. - -diff -purN -x config.status -x config.h -x BOOT ../binutils-2.30/bfd/Makefile.in binutils-2.30/bfd/Makefile.in ---- ../binutils-2.30/bfd/Makefile.in 2018-01-27 15:58:29.000000000 +0100 -+++ binutils-2.30/bfd/Makefile.in 2018-06-09 22:10:42.546333481 +0200 -@@ -386,7 +386,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel - # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is - # -I../zlib, unless we were configured with --with-system-zlib, in which - # case both are empty. --ZLIB = @zlibdir@ -lz -+ZLIB = #@zlibdir@ - ZLIBINC = @zlibinc@ - AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) - AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -diff -purN -x config.status -x config.h -x BOOT ../binutils-2.30/binutils/Makefile.in binutils-2.30/binutils/Makefile.in ---- ../binutils-2.30/binutils/Makefile.in 2018-01-27 16:02:51.000000000 +0100 -+++ binutils-2.30/binutils/Makefile.in 2018-06-09 22:55:02.974051534 +0200 -@@ -357,7 +357,7 @@ LEX = `if [ -f ../flex/flex ]; then echo - LEXLIB = @LEXLIB@ - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ - LIBICONV = @LIBICONV@ --LIBINTL = @LIBINTL@ -+LIBINTL = @LIBINTL@ ../zlib/libz.a - LIBINTL_DEP = @LIBINTL_DEP@ - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ -@@ -476,7 +476,7 @@ am__skipyacc = - # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is - # -I../zlib, unless we were configured with --with-system-zlib, in which - # case both are empty. --ZLIB = @zlibdir@ -lz -+ZLIB = @zlibdir@ $(PWD)/../zlib/libz.a - ZLIBINC = @zlibinc@ - AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) - AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) $(ZLIBINC) -diff -purN -x config.status -x config.h -x BOOT ../binutils-2.30/gas/Makefile.in binutils-2.30/gas/Makefile.in ---- ../binutils-2.30/gas/Makefile.in 2018-01-27 15:59:06.000000000 +0100 -+++ binutils-2.30/gas/Makefile.in 2018-06-09 22:15:27.247014898 +0200 -@@ -215,7 +215,7 @@ LDFLAGS = @LDFLAGS@ - LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi` - LEXLIB = @LEXLIB@ - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ --LIBINTL = @LIBINTL@ -+LIBINTL = @LIBINTL@ ../zlib/libz.a - LIBINTL_DEP = @LIBINTL_DEP@ - LIBM = @LIBM@ - LIBOBJS = @LIBOBJS@ -diff -purN -x config.status -x config.h -x BOOT ../binutils-2.30/gas/read.c binutils-2.30/gas/read.c ---- ../binutils-2.30/gas/read.c 2018-01-13 14:31:15.000000000 +0100 -+++ binutils-2.30/gas/read.c 2018-06-09 20:08:32.809230911 +0200 -@@ -38,7 +38,9 @@ - #include "obstack.h" - #include "ecoff.h" - #include "dw2gencfi.h" -+#if !MES_BOOTSTRAP - #include "wchar.h" -+#endif - - #ifndef TC_START_LABEL - #define TC_START_LABEL(STR, NUL_CHAR, NEXT_CHAR) (NEXT_CHAR == ':') -diff -purN -x config.status -x config.h -x BOOT ../binutils-2.30/gprof/Makefile.in binutils-2.30/gprof/Makefile.in ---- ../binutils-2.30/gprof/Makefile.in 2018-01-27 16:02:44.000000000 +0100 -+++ binutils-2.30/gprof/Makefile.in 2018-06-09 22:58:52.717801489 +0200 -@@ -229,7 +229,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_P - INSTOBJEXT = @INSTOBJEXT@ - LD = @LD@ - LDFLAGS = @LDFLAGS@ --LIBINTL = @LIBINTL@ -+LIBINTL = @LIBINTL@ ../zlib/libz.a - LIBINTL_DEP = @LIBINTL_DEP@ - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ -diff -purN -x config.status -x config.h -x BOOT ../binutils-2.30/ld/Makefile.in binutils-2.30/ld/Makefile.in ---- ../binutils-2.30/ld/Makefile.in 2018-01-27 16:03:10.000000000 +0100 -+++ binutils-2.30/ld/Makefile.in 2018-06-09 22:58:33.937494883 +0200 -@@ -294,7 +294,7 @@ LDFLAGS = @LDFLAGS@ - LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` - LEXLIB = @LEXLIB@ - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ --LIBINTL = @LIBINTL@ -+LIBINTL = @LIBINTL@ ../zlib/libz.a - LIBINTL_DEP = @LIBINTL_DEP@ - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ -diff -purN -x config.status -x config.h -x BOOT ../binutils-2.30/libiberty/md5.c binutils-2.30/libiberty/md5.c ---- ../binutils-2.30/libiberty/md5.c 2018-01-13 14:31:16.000000000 +0100 -+++ binutils-2.30/libiberty/md5.c 2018-06-09 18:54:17.647816563 +0200 -@@ -1,6 +1,6 @@ - /* md5.c - Functions to compute MD5 message digest of files or memory blocks - according to the definition of MD5 in RFC 1321 from April 1992. -- Copyright (C) 1995-2018 Free Software Foundation, Inc. -+ Copyright (C) 1995, 1996 Free Software Foundation, Inc. - - NOTE: This source is derived from an old version taken from the GNU C - Library (glibc). -@@ -17,7 +17,7 @@ - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, -- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - - /* Written by Ulrich Drepper <drep...@gnu.ai.mit.edu>, 1995. */ - -@@ -62,7 +62,8 @@ static const unsigned char fillbuf[64] = - /* Initialize structure containing state of computation. - (RFC 1321, 3.3: Step 3) */ - void --md5_init_ctx (struct md5_ctx *ctx) -+md5_init_ctx (ctx) -+ struct md5_ctx *ctx; - { - ctx->A = (md5_uint32) 0x67452301; - ctx->B = (md5_uint32) 0xefcdab89; -@@ -76,19 +77,17 @@ md5_init_ctx (struct md5_ctx *ctx) - /* Put result from CTX in first 16 bytes following RESBUF. The result - must be in little endian byte order. - -- IMPORTANT: RESBUF may not be aligned as strongly as MD5_UNIT32 so we -- put things in a local (aligned) buffer first, then memcpy into RESBUF. */ -+ IMPORTANT: On some systems it is required that RESBUF is correctly -+ aligned for a 32 bits value. */ - void * --md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) -+md5_read_ctx (ctx, resbuf) -+ const struct md5_ctx *ctx; -+ void *resbuf; - { -- md5_uint32 buffer[4]; -- -- buffer[0] = SWAP (ctx->A); -- buffer[1] = SWAP (ctx->B); -- buffer[2] = SWAP (ctx->C); -- buffer[3] = SWAP (ctx->D); -- -- memcpy (resbuf, buffer, 16); -+ ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); -+ ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); -+ ((md5_uint32 *) resbuf)[2] = SWAP (ctx->C); -+ ((md5_uint32 *) resbuf)[3] = SWAP (ctx->D); - - return resbuf; - } -@@ -99,11 +98,12 @@ md5_read_ctx (const struct md5_ctx *ctx, - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ - void * --md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) -+md5_finish_ctx (ctx, resbuf) -+ struct md5_ctx *ctx; -+ void *resbuf; - { - /* Take yet unprocessed bytes into account. */ - md5_uint32 bytes = ctx->buflen; -- md5_uint32 swap_bytes; - size_t pad; - - /* Now count remaining bytes. */ -@@ -114,13 +114,10 @@ md5_finish_ctx (struct md5_ctx *ctx, voi - pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; - memcpy (&ctx->buffer[bytes], fillbuf, pad); - -- /* Put the 64-bit file length in *bits* at the end of the buffer. -- Use memcpy to avoid aliasing problems. On most systems, this -- will be optimized away to the same code. */ -- swap_bytes = SWAP (ctx->total[0] << 3); -- memcpy (&ctx->buffer[bytes + pad], &swap_bytes, sizeof (swap_bytes)); -- swap_bytes = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); -- memcpy (&ctx->buffer[bytes + pad + 4], &swap_bytes, sizeof (swap_bytes)); -+ /* Put the 64-bit file length in *bits* at the end of the buffer. */ -+ *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); -+ *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | -+ (ctx->total[0] >> 29)); - - /* Process last bytes. */ - md5_process_block (ctx->buffer, bytes + pad + 8, ctx); -@@ -132,7 +129,9 @@ md5_finish_ctx (struct md5_ctx *ctx, voi - resulting message digest number will be written into the 16 bytes - beginning at RESBLOCK. */ - int --md5_stream (FILE *stream, void *resblock) -+md5_stream (stream, resblock) -+ FILE *stream; -+ void *resblock; - { - /* Important: BLOCKSIZE must be a multiple of 64. */ - #define BLOCKSIZE 4096 -@@ -187,7 +186,10 @@ md5_stream (FILE *stream, void *resblock - output yields to the wanted ASCII representation of the message - digest. */ - void * --md5_buffer (const char *buffer, size_t len, void *resblock) -+md5_buffer (buffer, len, resblock) -+ const char *buffer; -+ size_t len; -+ void *resblock; - { - struct md5_ctx ctx; - -@@ -203,7 +205,10 @@ md5_buffer (const char *buffer, size_t l - - - void --md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) -+md5_process_bytes (buffer, len, ctx) -+ const void *buffer; -+ size_t len; -+ struct md5_ctx *ctx; - { - /* When we already have some bits in our internal buffer concatenate - both inputs first. */ -@@ -231,29 +236,9 @@ md5_process_bytes (const void *buffer, s - /* Process available complete blocks. */ - if (len > 64) - { --#if !_STRING_ARCH_unaligned --/* To check alignment gcc has an appropriate operator. Other -- compilers don't. */ --# if __GNUC__ >= 2 --# define UNALIGNED_P(p) (((md5_uintptr) p) % __alignof__ (md5_uint32) != 0) --# else --# define UNALIGNED_P(p) (((md5_uintptr) p) % sizeof (md5_uint32) != 0) --# endif -- if (UNALIGNED_P (buffer)) -- while (len > 64) -- { -- memcpy (ctx->buffer, buffer, 64); -- md5_process_block (ctx->buffer, 64, ctx); -- buffer = (const char *) buffer + 64; -- len -= 64; -- } -- else --#endif -- { -- md5_process_block (buffer, len & ~63, ctx); -- buffer = (const void *) ((const char *) buffer + (len & ~63)); -- len &= 63; -- } -+ md5_process_block (buffer, len & ~63, ctx); -+ buffer = (const void *) ((const char *) buffer + (len & ~63)); -+ len &= 63; - } - - /* Move remaining bytes in internal buffer. */ -@@ -278,7 +263,10 @@ md5_process_bytes (const void *buffer, s - It is assumed that LEN % 64 == 0. */ - - void --md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) -+md5_process_block (buffer, len, ctx) -+ const void *buffer; -+ size_t len; -+ struct md5_ctx *ctx; - { - md5_uint32 correct_words[16]; - const md5_uint32 *words = (const md5_uint32 *) buffer; -@@ -293,7 +281,8 @@ md5_process_block (const void *buffer, s - length of the file up to 2^64 bits. Here we only compute the - number of bytes. Do a double word increment. */ - ctx->total[0] += len; -- ctx->total[1] += ((len >> 31) >> 1) + (ctx->total[0] < len); -+ if (ctx->total[0] < len) -+ ++ctx->total[1]; - - /* Process all bytes in the buffer with 64 bytes in each round of - the loop. */ -diff -purN -x config.status -x config.h -x BOOT ../binutils-2.30/zlib/configure binutils-2.30/zlib/configure ---- ../binutils-2.30/zlib/configure 2018-01-13 14:31:16.000000000 +0100 -+++ binutils-2.30/zlib/configure 2018-06-09 21:10:55.006956398 +0200 -@@ -11116,7 +11116,7 @@ if test "${ac_cv_lib_z_deflate+set}" = s - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lz $LIBS" -+LIBS="$PWD/libz.a $LIBS" - if test x$gcc_no_link = xyes; then - as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 - fi