[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
95/210: gnu: binutils-boot: Update to 2.20.1a.
From: |
Jan Nieuwenhuizen |
Subject: |
95/210: gnu: binutils-boot: Update to 2.20.1a. |
Date: |
Sat, 8 Sep 2018 10:36:14 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 1914d868db7deff6abf2ac91a3cba4d37bda10a3
Author: Jan Nieuwenhuizen <address@hidden>
Date: Sat Jun 16 15:25:45 2018 +0200
gnu: binutils-boot: Update to 2.20.1a.
* gnu/packages/mes.scm (binutils-boot): Update to 2.20.1a.
* gnu/packages/patches/binutils-boot-2.20.1a.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/mes.scm | 41 +++-
gnu/packages/patches/binutils-boot-2.20.1a.patch | 264 +++++++++++++++++++++++
3 files changed, 299 insertions(+), 7 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 7554e9b..76e6bbc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -594,6 +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-2.20.1a.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 ed141e1..f1c3c7f 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -637,22 +637,24 @@ standard.")
(package
(inherit binutils)
(name "binutils-boot0")
- (version "2.14")
+ (version "2.20.1a")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
- version ".tar.gz"))
+ version ".tar.bz2"))
+ (patches (search-patches "binutils-boot-2.20.1a.patch"))
(sha256
(base32
- "1w8xp7k44bkijr974x9918i4p1sw4g2fcd5mxvspkjpg38m214ds"))))
+ "0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi"))))
(supported-systems '("i686-linux"))
- (native-inputs `(("flex" ,flex) ; MORTAL SIN HERE
+ (native-inputs `(("flex" ,flex) ; cheat
("mes" ,mes-boot)
("tcc" ,tcc-boot)))
(arguments
`(#:tests? #f ; runtest: command not found
#:parallel-build? #f
#:strip-binaries? #f
+ #:make-flags '("AR=tcc -ar" "RANLIB=true")
#:phases
(modify-phases %standard-phases
(replace 'configure
@@ -662,8 +664,28 @@ standard.")
" -D __STDC__=1 "
" -D __GLIBC_MINOR__=6"
" -D MES_BOOTSTRAP=1")))
- (unsetenv "C_INCLUDE_PATH") ; flex
- (unsetenv "LIBRARY_PATH")
+ (unsetenv "C_INCLUDE_PATH") ; flex
+ (unsetenv "CPLUS_INCLUDE_PATH") ; flex
+ (unsetenv "CPATH") ; flex
+ (unsetenv "LIBRARY_PATH") ; flex
+ (setenv "PATH"
+ (string-append
+ (assoc-ref %build-inputs "flex") "/bin"
+ ":" (assoc-ref %build-inputs "tcc") "/bin"
+ ":" (assoc-ref %build-inputs "mes") "/bin"
+
+ ;; more bootstrap cheats
+ ":" (assoc-ref %build-inputs "bash") "/bin"
+ ":" (assoc-ref %build-inputs "bzip2") "/bin"
+ ":" (assoc-ref %build-inputs "coreutils") "/bin"
+ ":" (assoc-ref %build-inputs "diffutils") "/bin"
+ ":" (assoc-ref %build-inputs "gawk") "/bin"
+ ":" (assoc-ref %build-inputs "grep") "/bin"
+ ":" (assoc-ref %build-inputs "gzip") "/bin"
+ ":" (assoc-ref %build-inputs "make") "/bin"
+ ":" (assoc-ref %build-inputs "sed") "/bin"
+ ":" (assoc-ref %build-inputs "tar") "/bin"))
+
(setenv "CONFIG_SHELL" (string-append
(assoc-ref %build-inputs "bash")
"/bin/sh"))
@@ -672,12 +694,17 @@ standard.")
(setenv "CXX" "false")
(setenv "RANLIB" "true")
(setenv "CC" (string-append "tcc -static" " " cppflags))
+ (setenv "LD" (string-append "tcc -static" " " cppflags))
+ (setenv "CC_FOR_BUILD" (string-append "tcc -static" " "
cppflags))
(setenv "CPP" (string-append "tcc -E" " " cppflags))
+ (setenv "CC_FOR_BUILD" (string-append "tcc -static" " "
cppflags))
+ (setenv "OBJC" (string-append "tcc -static" " " cppflags))
(and
(zero?
(system* "./configure"
+ "--disable-nls"
"--disable-shared"
- "--enable-static"
+ "--disable-werror"
"--host=i386-unknown-linux"
"--target=i386-unknown-linux"
(string-append "--prefix=" out))))))))))))
diff --git a/gnu/packages/patches/binutils-boot-2.20.1a.patch
b/gnu/packages/patches/binutils-boot-2.20.1a.patch
new file mode 100644
index 0000000..2f0327e
--- /dev/null
+++ b/gnu/packages/patches/binutils-boot-2.20.1a.patch
@@ -0,0 +1,264 @@
+Binary files ../binutils-2.20.1a/bfd/doc/chew and
binutils-2.20.1a/bfd/doc/chew differ
+diff -purN -x config.status -x config.h -x BOOT
../binutils-2.20.1a/bfd/elf32-i386.c binutils-2.20.1a/bfd/elf32-i386.c
+--- ../binutils-2.20.1a/bfd/elf32-i386.c 2009-09-10 13:47:12.000000000
+0200
++++ binutils-2.20.1a/bfd/elf32-i386.c 2018-06-23 19:33:20.068134411 +0200
+@@ -4254,6 +4254,7 @@ elf_i386_finish_dynamic_symbol (bfd *out
+ if (!h->pointer_equality_needed)
+ abort ();
+
++ {
+ /* For non-shared object, we can't use .got.plt, which
+ contains the real function addres if we need pointer
+ equality. We load the GOT entry with the PLT entry. */
+@@ -4262,6 +4263,7 @@ elf_i386_finish_dynamic_symbol (bfd *out
+ (plt->output_section->vma
+ + plt->output_offset + h->plt.offset),
+ htab->elf.sgot->contents + h->got.offset);
++ }
+ return TRUE;
+ }
+ }
+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
++++ binutils-2.20.1a/bfd/elfcode.h 2018-06-19 19:07:16.647627075 +0200
+@@ -73,6 +73,7 @@
+ #include "bfdlink.h"
+ #include "libbfd.h"
+ #include "elf-bfd.h"
++#include <limits.h>
+
+ /* Renaming structures, typedefs, macros and functions to be size-specific.
*/
+ #define Elf_External_Ehdr NAME(Elf,External_Ehdr)
+@@ -706,8 +707,8 @@ elf_object_p (bfd *abfd)
+ if (i_ehdrp->e_shnum != 1)
+ {
+ /* Check that we don't have a totally silly number of sections. */
+- if (i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (x_shdr)
+- || i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (i_shdr))
++ if (i_ehdrp->e_shnum > INT_MAX / sizeof (x_shdr)
++ || i_ehdrp->e_shnum > INT_MAX / sizeof (i_shdr))
+ goto got_wrong_format_error;
+
+ where += (i_ehdrp->e_shnum - 1) * sizeof (x_shdr);
+diff -purN -x config.status -x config.h -x BOOT
../binutils-2.20.1a/bfd/Makefile.in binutils-2.20.1a/bfd/Makefile.in
+--- ../binutils-2.20.1a/bfd/Makefile.in 2010-03-03 14:59:15.000000000
+0100
++++ binutils-2.20.1a/bfd/Makefile.in 2018-06-16 14:00:46.297724081 +0200
+@@ -320,7 +320,7 @@ ACLOCAL_AMFLAGS = -I . -I .. -I ../confi
+ # RELEASE=y
+ INCDIR = $(srcdir)/../include
+ CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
+-SUBDIRS = doc po
++SUBDIRS = # these fail to build: doc po
+ bfddocdir = doc
+ libbfd_la_LDFLAGS = $(am__append_1) -release `cat libtool-soversion` \
+ @SHARED_LDFLAGS@ $(am__empty)
+diff -purN -x config.status -x config.h -x BOOT
../binutils-2.20.1a/binutils/arparse.c binutils-2.20.1a/binutils/arparse.c
+--- ../binutils-2.20.1a/binutils/arparse.c 2009-10-16 13:52:16.000000000
+0200
++++ binutils-2.20.1a/binutils/arparse.c 2018-06-19 01:30:00.576219981
+0200
+@@ -330,7 +330,7 @@ YYID (i)
+ # define YYMALLOC malloc
+ # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ ||
defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
++void *malloc (size_t); /* INFRINGES ON USER NAME SPACE */
+ # endif
+ # endif
+ # ifndef YYFREE
+diff -purN -x config.status -x config.h -x BOOT
../binutils-2.20.1a/binutils/dwarf.c binutils-2.20.1a/binutils/dwarf.c
+--- ../binutils-2.20.1a/binutils/dwarf.c 2009-09-14 13:43:26.000000000
+0200
++++ binutils-2.20.1a/binutils/dwarf.c 2018-06-16 14:01:45.162684662 +0200
+@@ -27,6 +27,10 @@
+ #include "dwarf2.h"
+ #include "dwarf.h"
+
++#if MES_BOOTSTRAP
++#include "getopt.h"
++#endif
++
+ static int have_frame_base;
+ static int need_base_address;
+
+diff -purN -x config.status -x config.h -x BOOT
../binutils-2.20.1a/binutils/sysinfo.c binutils-2.20.1a/binutils/sysinfo.c
+--- ../binutils-2.20.1a/binutils/sysinfo.c 2009-10-16 13:52:17.000000000
+0200
++++ binutils-2.20.1a/binutils/sysinfo.c 2018-06-19 01:29:23.823612807
+0200
+@@ -286,7 +286,7 @@ YYID (i)
+ # define YYMALLOC malloc
+ # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ ||
defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
++void *malloc (size_t); /* INFRINGES ON USER NAME SPACE */
+ # endif
+ # endif
+ # ifndef YYFREE
+diff -purN -x config.status -x config.h -x BOOT ../binutils-2.20.1a/BOOT-DEBUG
binutils-2.20.1a/BOOT-DEBUG
+--- ../binutils-2.20.1a/BOOT-DEBUG 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.20.1a/BOOT-DEBUG 2018-06-19 07:43:48.341211651 +0200
+@@ -0,0 +1,113 @@
++#! /bin/sh
++
++set -x
++. ../config.sh
++
++PATH=$I686_GCC_PREFIX/bin/:$PATH
++PATH=/gnu/store/gqicgnqmcaf3nfvv9ck9m5fp7n510j0x-flex-2.6.4/bin:$PATH
++
++CCBIN=i686-unknown-linux-gnu-gcc
++
++CPPFLAGS="-D __GLIBC_MINOR__=6 -D MES_BOOTSTRAP=1 -I $HOME/src/mes/include"
++#CPPFLAGS="-D __GLIBC_MINOR__=6 -D MES_BOOTSTRAP=1"
++
++rm -f $HOME/src/mes/lib/x86-mes-gcc/libc+gnu.a
++ar rc $HOME/src/mes/lib/x86-mes-gcc/libc+gnu.a
$HOME/src/mes/lib/x86-mes-gcc/libc+gnu.o
++CFLAGS="-g -nostdlib -nostdinc -fno-builtin -L$HOME/src/mes/lib/x86-mes-gcc"
++CPP="$CCBIN -E $CPPFLAGS"
++CXXCPP="$CCBIN -E $CPPFLAGS"
++CC="i686-unknown-linux-gnu-gcc -static $CPPFLAGS $CFLAGS"
++#LDFLAGS="-static $CFLAGS $HOME/src/mes/lib/x86-mes-gcc/crt1.o -lc"
++LDFLAGS="-static $CFLAGS $HOME/src/mes/lib/x86-mes-gcc/crt1.o"
++LIBS="-lc+gnu"
++LD="$CCBIN $LDFLAGS"
++AR="ar"
++RANLIB="true"
++
++LDFLAGS_FOR_BUILD="$LDFLAGS"
++LIBS_FOR_BUILD=$LIBS
++export CFLAGS LIBS LDFLAGS_FOR_BUILD LIBS_FOR_BUILD
++
++
++# libtool: link: require no space between `-L' and
`/home/janneke/src/mes/lib/x86-mes-gcc'
++
++# make CC="$CC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" CXXCPP="$CXXCPP" AR="$AR"
RANLIB="true" ZLIB="$ZLIB"
++# make install CC="$CC" AR="$AR" RANLIB="true"
++
++# exit 0
++
++make distclean >/dev/null 2>&1
++rm -rf debug */debug */*/debug
++rm -rf */usr */*/usr
++
++# (cd gas && make distclean >/dev/null 2>&1)
++# rm -f TAGS
++rm -f foo.a foo.o binutils/foo.a binutils/foo.o
++rm -f config.log */config.log */*/config.log
++rm -f config.cache */config.cache
++rm -f config.status */config.status */*/config.status */*/*/config.status
*/*/*/*/config.status
++rm -f if30295.c
++rm -f if30640.c
++rm -f config.h */config.h
++rm config.back
++rm -f $(find . -name '*.tmp')
++rm -f $(find . -name '*.lo')
++[ -d ../../binutils-2.25 ] && (cd .. && diff -purN -x usr -x debug -x foo.a
-x foo.c -x foo.o -x config.status -x config.h -x BOOT -x BOOT-DEBUG
../binutils-2.25 binutils-2.25 > binutils-2.25.pets)
++[ -d ../../binutils-2.25 ] && cp --backup=t ../binutils-2.25.pets
../binutils-2.25.patch
++
++# etags $(find . -name '*.h' -o -name '*.c')
++
++
++
++set -e
++
++# --build=i386-unknown-linux\
++
++AR="$AR"\
++ RANLIB="$RANLIB"\
++ CPP="$CPP"\
++ CXX="false"\
++ CXXCPP="$CXXCPP"\
++ CC_FOR_BUILD="$CC"\
++ CC="$CC"\
++ LD="$LD"\
++ LDFLAGS="$LDFLAGS"\
++ LIBS="$LIBS"\
++ ./configure\
++ --host=i386-unknown-linux\
++ --target=i386-unknown-linux\
++ --disable-shared\
++ --enable-static\
++ --enable-compressed-debug-sections=no\
++ --disable-gold\
++ --disable-plugins\
++ --disable-x86-relax-relocations\
++ --with-system-libz\
++ --prefix=$PWD/debug
++
++set -x
++make CC="$CC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" CXXCPP="$CXXCPP" AR="$AR"
RANLIB="true" ZLIB="$ZLIB"
++make install CC="$CC" AR="$AR" RANLIB="true"
++# mv usr/bin/ar usr/bin/.ar-real
++# cat > usr/bin/ar <<EOF
++# #! /bin/sh
++
++# set -x
++
++# dir=\$(dirname \$0)
++# ar=\$dir/.ar-real
++# command=\$1
++# shift
++# lib=\$1
++# shift
++# if [ \$command = 'r' -o \$command = 'rc' ]; then
++# for i in \$@; do
++# \$ar r \$lib \$i
++# ls -l \$lib
++# done
++# else
++# \$ar \$command \$lib \$@
++# fi
++# EOF
++# chmod +x usr/bin/ar
++
+diff -purN -x config.status -x config.h -x BOOT
../binutils-2.20.1a/gas/config/tc-i386.c binutils-2.20.1a/gas/config/tc-i386.c
+--- ../binutils-2.20.1a/gas/config/tc-i386.c 2009-09-14 13:43:27.000000000
+0200
++++ binutils-2.20.1a/gas/config/tc-i386.c 2018-06-23 19:39:37.546254752
+0200
+@@ -4869,6 +4869,7 @@ build_modrm_byte (void)
+ if (vex_3_sources)
+ {
+ unsigned int nds, reg;
++ expressionS *exp;
+
+ if (i.tm.opcode_modifier.veximmext
+ && i.tm.opcode_modifier.immext)
+@@ -4892,7 +4893,7 @@ build_modrm_byte (void)
+
+ /* Generate an 8bit immediate operand to encode the register
+ operand. */
+- expressionS *exp = &im_expressions[i.imm_operands++];
++ exp = &im_expressions[i.imm_operands++];
+ i.op[i.operands].imms = exp;
+ i.types[i.operands] = imm8;
+ i.operands++;
+diff -purN -x config.status -x config.h -x BOOT
../binutils-2.20.1a/ld/ldgram.c binutils-2.20.1a/ld/ldgram.c
+--- ../binutils-2.20.1a/ld/ldgram.c 2009-10-16 13:52:15.000000000 +0200
++++ binutils-2.20.1a/ld/ldgram.c 2018-06-19 01:30:57.809165437 +0200
+@@ -561,7 +561,7 @@ YYID (i)
+ # define YYMALLOC malloc
+ # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ ||
defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
++void *malloc (size_t); /* INFRINGES ON USER NAME SPACE */
+ # endif
+ # endif
+ # ifndef YYFREE
+diff -purN -x config.status -x config.h -x BOOT
../binutils-2.20.1a/libiberty/strncmp.c binutils-2.20.1a/libiberty/strncmp.c
+--- ../binutils-2.20.1a/libiberty/strncmp.c 2005-03-28 04:09:01.000000000
+0200
++++ binutils-2.20.1a/libiberty/strncmp.c 2018-06-23 19:19:50.038992482
+0200
+@@ -15,6 +15,13 @@ Compares the first @var{n} bytes of two
+ #include <ansidecl.h>
+ #include <stddef.h>
+
++#if !MES_BOOTSTRAP
++
++/*
++ libtool: link:
/gnu/store/rgwjixk5zl7s2d3xsb2ws2z2q3m0xjm4-tcc-boot-0.9.26-0.97196ce/bin/tcc
-D __GLIBC_MINOR__=6 -D MES_BOOTSTRAP=1 -g -o size size.o bucomm.o version.o
filemode.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a ./../intl/libintl.a
++
/gnu/store/rgwjixk5zl7s2d3xsb2ws2z2q3m0xjm4-tcc-boot-0.9.26-0.97196ce/lib/libc.a:
error: 'strncmp' defined twice
++*/
++
+ int
+ strncmp(const char *s1, const char *s2, register size_t n)
+ {
+@@ -31,3 +38,5 @@ strncmp(const char *s1, const char *s2,
+ }
+ return 0;
+ }
++
++#endif // !MES_BOOTSTRAP
- 115/210: gnu: glibc-mesboot: Package with bootstrap-guile., (continued)
- 115/210: gnu: glibc-mesboot: Package with bootstrap-guile., Jan Nieuwenhuizen, 2018/09/08
- 116/210: gnu: gcc-mesboot0: Package with bootstrap-guile., Jan Nieuwenhuizen, 2018/09/08
- 118/210: gnu: mescc-tools-boot: Revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 121/210: gnu: tcc-boot0: Revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 110/210: Revert "REMOVEME: %fake-bootstrap => #t.", Jan Nieuwenhuizen, 2018/09/08
- 109/210: REMOVEME: %fake-bootstrap => #t., Jan Nieuwenhuizen, 2018/09/08
- 103/210: gnu: glibc-mesboot: Rename from glibc-boot., Jan Nieuwenhuizen, 2018/09/08
- 102/210: gnu: gcc-core-mesboot: Rename from gcc-core-boot., Jan Nieuwenhuizen, 2018/09/08
- 97/210: gnu: gcc-boot: build with %cheat-binutils?, Jan Nieuwenhuizen, 2018/09/08
- 64/210: gnu: binutils-boot: Update to 2.14., Jan Nieuwenhuizen, 2018/09/08
- 95/210: gnu: binutils-boot: Update to 2.20.1a.,
Jan Nieuwenhuizen <=
- 98/210: gnu: binutils-boot0: Inject AR, LD from bootstrap-binaries., Jan Nieuwenhuizen, 2018/09/08
- 151/210: gnu: Add diffutils-mesboot 2.7., Jan Nieuwenhuizen, 2018/09/08
- 128/210: gnu: gcc-mesboot: Revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 96/210: gnu: Add binutils-boot0-cheat., Jan Nieuwenhuizen, 2018/09/08
- 76/210: Revert "gnu: gcc-boot: Update to 3.2.", Jan Nieuwenhuizen, 2018/09/08
- 148/210: gnu: mes-boot: Update to 0.17.1., Jan Nieuwenhuizen, 2018/09/08
- 126/210: gnu: gcc-mesboot0: Revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 124/210: gnu: gcc-core-mesboot: Revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 65/210: gnu: binutils-boot: Update to 2.25., Jan Nieuwenhuizen, 2018/09/08
- 99/210: gnu: Remove binutils-boot0-cheat., Jan Nieuwenhuizen, 2018/09/08