[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
27/30: gnu: glibc-boot: Update to 2.2.5.
From: |
Jan Nieuwenhuizen |
Subject: |
27/30: gnu: glibc-boot: Update to 2.2.5. |
Date: |
Tue, 12 Jun 2018 13:20:54 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit efa413241f93ed9cb74165f5e2b862b032ed29b7
Author: Jan Nieuwenhuizen <address@hidden>
Date: Sun Jun 10 11:15:05 2018 +0200
gnu: glibc-boot: Update to 2.2.5.
* gnu/packages/mes.scm (glibc-boot): Update to 2.2.5.
* gnu/packages/patches/glibc-boot-2.2.5.patch: New file.
* gnu/packages/patches/glibc-boot.patch: Remove.
* gnu/local.mk (dist_patch_DATA): Rename it.
---
gnu/local.mk | 2 +-
gnu/packages/mes.scm | 90 ++++++------
gnu/packages/patches/glibc-boot-2.2.5.patch | 204 ++++++++++++++++++++++++++++
3 files changed, 255 insertions(+), 41 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index e1984b0..4b0cf07 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -683,7 +683,7 @@ dist_patch_DATA =
\
%D%/packages/patches/glibc-CVE-2017-1000366-pt2.patch \
%D%/packages/patches/glibc-CVE-2017-1000366-pt3.patch \
%D%/packages/patches/glibc-CVE-2017-15670-15671.patch \
- %D%/packages/patches/glibc-boot.patch \
+ %D%/packages/patches/glibc-boot-2.2.5.patch \
%D%/packages/patches/glibc-bootstrap-system.patch \
%D%/packages/patches/glibc-ldd-x86_64.patch \
%D%/packages/patches/glibc-locales.patch \
diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 20f1c20..832a9ca 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -677,61 +677,71 @@ ac_cv_c_float_format='IEEE (little-endian)'
(package
(inherit glibc)
(name "glibc-boot")
- (version "2.0.1")
+ (version "2.2.5")
(source (origin
(method url-fetch)
- (uri (string-append
"https://gcc.gnu.org/pub/glibc/old-releases/glibc-"
- version ".tar.bz2"))
- (patches (search-patches "glibc-boot.patch"))
+ (uri (string-append "mirror://gnu/glibc/glibc-"
+ version
+ ".tar.gz"))
+ (patches (search-patches "glibc-boot-2.2.5.patch"))
(sha256
(base32
- "1cckm2242wcc0i0zbs7djjp2z215fdca0j3ay6ydxhchvw4vir2v"))))
+ "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
(supported-systems '("i686-linux"))
(native-inputs `(("binutils" ,binutils-boot)
- ("gcc" ,gcc-boot)
- ("tcc" ,tcc-boot)))
+ ("gcc" ,gcc-boot)))
(propagated-inputs `(("kernel-headers" ,(linux-libre-headers-boot0))))
+ (outputs '("out"))
(arguments
- `(#:tests? #f ; runtest: command not found
+ `(#:tests? #f
#:strip-binaries? #f
- #:parallel-build? #f
- #:make-flags `(,(string-append "sysincludedir=" (assoc-ref
%build-inputs "tcc") "/include"))
- #:modules ((guix build gnu-build-system)
- (guix build utils)
- (srfi srfi-1))
+ #:parallel-build? #f ; gcc-2.95.3 ICEs on massively parallel builds
+ #:configure-flags
+ (let ((out (assoc-ref %outputs "out"))
+ (headers (assoc-ref %build-inputs "kernel-headers")))
+ #:configure-flags
+ (list
+ "--disable-shared"
+ "--enable-static"
+ "--disable-sanity-checks"
+ "--host=i386-unknown-linux"
+ "--target=i386-unknown-linux"
+ (string-append "--with-headers=" headers "/include")
+ "--enable-static-nss"
+ "--without-__thread"
+ "--without-cvs"
+ "--without-gd"
+ "--without-tls"
+ (string-append "--prefix=" out)))
+ #:make-flags '("lib")
#:phases
(modify-phases %standard-phases
- (replace 'configure
+ (add-before 'configure 'setenv
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (headers (assoc-ref %build-inputs "kernel-headers"))
- (binutils (assoc-ref %build-inputs "binutils"))
- (tcc (assoc-ref %build-inputs "tcc")))
- (setenv "PATH" (string-append
- binutils "/i686-unknown-linux-gnu/bin"
- ":" (getenv "PATH")))
+ (let* ((out (assoc-ref outputs "out"))
+ (headers (assoc-ref %build-inputs "kernel-headers"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (cppflags (string-append
+ " -D __STDC__=1"
+ " -D MES_BOOTSTRAP=1"))
+ (cflags (string-append " -L " (getcwd))))
(setenv "CONFIG_SHELL" (string-append
(assoc-ref %build-inputs "bash")
"/bin/sh"))
- (setenv "CPPLAGS" (string-append "-I" headers "/include"))
- (setenv "CC" (string-append
- "gcc"
- " -I " headers "/include "
- " -D _POSIX_OPEN_MAX=16" ;; how to move to mes?
- " -DSTDOUT_FILENO=1"
- " -Dstderr=2"
- " -L " (getcwd)))
- (setenv "CPP" "gcc -E")
- (system* "ar" "r" "libc.a"
- (string-append tcc "/lib/libg.o"))
- (system* "ls" "-ltrF")
- (and
- (zero?
- (system* "./configure"
- "--host=i386-unknown-linux"
- "--target=i386-unknown-linux"
- "--disable-sanity-checks"
- (string-append "--prefix=" out))))))))))))
+ (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
+ (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
+ (unsetenv "C_INCLUDE_PATH")
+ (unsetenv "LIBRARY_PATH"))))
+ ;; glibc-2.2.5 needs a slightly more classical invocation of configure
+ ;; configure: warning:
CONFIG_SHELL=/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash:
invalid host type
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (zero?
+ (apply system* "./configure" configure-flags))))
+ (replace 'install
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (zero?
+ (apply system* "make" "install-lib-all" "install-headers"
make-flags)))))))))
;;;
diff --git a/gnu/packages/patches/glibc-boot-2.2.5.patch
b/gnu/packages/patches/glibc-boot-2.2.5.patch
new file mode 100644
index 0000000..e8b9c52
--- /dev/null
+++ b/gnu/packages/patches/glibc-boot-2.2.5.patch
@@ -0,0 +1,204 @@
+odiff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x
BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/adiff glibc-2.2.5/adiff
+--- ../glibc-2.2.5/adiff 1970-01-01 01:00:00.000000000 +0100
++++ glibc-2.2.5/adiff 2018-06-09 10:43:27.954899327 +0200
+@@ -0,0 +1,26 @@
++make 4.x should be fine
++
++sed: unterminated `s' command
++
++ fopen_max=16
++ 16
++
++timex.h:
++
++gcc: Internal compiler error: program cc1 got fatal signal 11
++
++syslog.c:
++syslog.c:219: `cancel_handler' undeclared (first use in this function)
++
++Makefile:250: *** mixed implicit and normal rules: deprecated syntax
++make[1]: *** No rule to make target 'stamp.o', needed by 'lib'. Stop.
++make[1]: Leaving directory
'/tmp/guix-build-glibc-boot-2.2.5.drv-0/glibc-2.2.5/manual'
++
++math/ftestexcept.c:
++/tmp/guix-build-glibc-boot-2.2.5.drv-0/cce9CKia.s: Assembler messages:
++/tmp/guix-build-glibc-boot-2.2.5.drv-0/cce9CKia.s:61: Error: operand type
mismatch for `fnstsw'
++make[1]: *** [../sysd-rules:256: ftestexcept.o] Error 1
++make[1]: Leaving directory
'/tmp/guix-build-glibc-boot-2.2.5.drv-0/glibc-2.2.5/math'
++
++
++glibc-2.2.5/stdio-common/perror.c:68: undefined reference to `fileno_unlocked'
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x
BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/configure glibc-2.2.5/configure
+--- ../glibc-2.2.5/configure 2002-01-08 23:16:44.000000000 +0100
++++ glibc-2.2.5/configure 2018-06-07 20:47:26.608895319 +0200
+@@ -1530,7 +1530,7 @@ echo "configure:1530: checking version o
+ ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU
Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 3.79* | 3.[89]*)
++ 3.79* | 3.[89]* | 4.*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x
BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/Makerules glibc-2.2.5/Makerules
+--- ../glibc-2.2.5/Makerules 2001-11-16 02:02:19.000000000 +0100
++++ glibc-2.2.5/Makerules 2018-06-10 14:54:18.152989789 +0200
+@@ -748,6 +748,18 @@ endef
+ installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
+ $(inst_libdir)/$(patsubst %,$(libtype$o),\
+ $(libprefix)$(libc-name)))
++
++ifeq (yes,$(build-shared))
++install-lib-all: $(inst_libdir)/libc.a \
++ $(inst_slibdir)/libc.so$(libc.so-version) \
++ $(inst_slibdir)/libc-$(version).so \
++ $(inst_libdir)/libc.so \
++ install-lib
++else
++install-lib-all: $(inst_libdir)/libc.a \
++ install-lib
++endif
++
+ install: $(installed-libcs)
+ $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
+ $(make-target-directory)
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x
BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/misc/syslog.c
glibc-2.2.5/misc/syslog.c
+--- ../glibc-2.2.5/misc/syslog.c 2001-08-31 01:13:49.000000000 +0200
++++ glibc-2.2.5/misc/syslog.c 2018-06-09 09:01:20.008918690 +0200
+@@ -216,9 +216,11 @@ vsyslog(pri, fmt, ap)
+
+ /* Prepare for multiple users. We have to take care: open and
+ write are cancellation points. */
++#if _LIBC_REENTRANT
+ __libc_cleanup_region_start (1, (void (*) (void *)) cancel_handler,
+ &oldaction_ptr);
+ __libc_lock_lock (syslog_lock);
++#endif
+
+ /* Prepare for a broken connection. */
+ memset (&action, 0, sizeof (action));
+@@ -268,9 +270,11 @@ vsyslog(pri, fmt, ap)
+ if (sigpipe == 0)
+ __sigaction (SIGPIPE, &oldaction, (struct sigaction *) NULL);
+
++#if _LIBC_REENTRANT
+ /* End of critical section. */
+ __libc_cleanup_region_end (0);
+ __libc_lock_unlock (syslog_lock);
++#endif
+
+ free (buf);
+ }
+@@ -326,16 +330,20 @@ openlog_internal(const char *ident, int
+ void
+ openlog (const char *ident, int logstat, int logfac)
+ {
++#if _LIBC_REENTRANT
+ /* Protect against multiple users. */
+ __libc_cleanup_region_start (1,
+ (void (*) __P ((void *))) __libc_mutex_unlock,
+ &syslog_lock);
+ __libc_lock_lock (syslog_lock);
++#endif
+
+ openlog_internal (ident, logstat, logfac);
+
++#if _LIBC_REENTRANT
+ /* Free the lock. */
+ __libc_cleanup_region_end (1);
++#endif
+ }
+
+ static void
+@@ -358,18 +366,22 @@ closelog_internal()
+ void
+ closelog ()
+ {
++#if _LIBC_REENTRANT
+ /* Protect against multiple users. */
+ __libc_cleanup_region_start (1,
+ (void (*) __P ((void *))) __libc_mutex_unlock,
+ &syslog_lock);
+ __libc_lock_lock (syslog_lock);
++#endif
+
+ closelog_internal ();
+ LogTag = NULL;
+ LogType = SOCK_DGRAM; /* this is the default */
+
++#if _LIBC_REENTRANT
+ /* Free the lock. */
+ __libc_cleanup_region_end (1);
++#endif
+ }
+
+ #ifdef _LIBC_REENTRANT
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x
BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/Rules glibc-2.2.5/Rules
+--- ../glibc-2.2.5/Rules 2001-08-30 00:44:35.000000000 +0200
++++ glibc-2.2.5/Rules 2018-06-09 08:15:54.880683675 +0200
+@@ -218,7 +218,7 @@ endif
+ fopen_max=`sed -n 's/^#define OPEN_MAX //1p' $(@:st=hT)`; \
+ filename_max=`sed -n 's/^#define PATH_MAX //1p' $(@:st=hT)`; \
+ iov_max=`sed -n 's/^#define UIO_MAXIOV //p' $(@:st=hT)`; \
+- fopen_max=$${fopen_max:-16}; \
++ fopen_max=$${fu_fopen_max:-16}; \
+ filename_max=$${filename_max:-1024}; \
+ if [ -z $$iov_max ]; then \
+ define_iov_max="# undef IOV_MAX"; \
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x
BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/stdio-common/perror.c
glibc-2.2.5/stdio-common/perror.c
+--- ../glibc-2.2.5/stdio-common/perror.c 2001-09-01 07:33:01.000000000
+0200
++++ glibc-2.2.5/stdio-common/perror.c 2018-06-09 10:42:25.909899529 +0200
+@@ -48,6 +48,8 @@ perror_internal (FILE *fp, const char *s
+ }
+
+
++#define fileno_unlocked(x) 1
++
+ /* Print a line on stderr consisting of the text in S, a colon, a space,
+ a message describing the meaning of the contents of `errno' and a newline.
+ If S is NULL or "", the colon and space are omitted. */
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x
BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/sysdeps/i386/fpu/ftestexcept.c
glibc-2.2.5/sysdeps/i386/fpu/ftestexcept.c
+--- ../glibc-2.2.5/sysdeps/i386/fpu/ftestexcept.c 2001-07-06
06:55:53.000000000 +0200
++++ glibc-2.2.5/sysdeps/i386/fpu/ftestexcept.c 2018-06-09 09:45:13.363031424
+0200
+@@ -25,8 +25,10 @@ fetestexcept (int excepts)
+ {
+ int temp;
+
++#if 0
+ /* Get current exceptions. */
+ __asm__ ("fnstsw %0" : "=a" (temp));
++#endif
+
+ return temp & excepts & FE_ALL_EXCEPT;
+ }
+diff -purN -x .git -x Makefile -x config.status -x config.h -x BOOT -x
BOOT-GCC -x texis -x '*.info*'
../glibc-2.2.5/sysdeps/unix/sysv/linux/sys/timex.h
glibc-2.2.5/sysdeps/unix/sysv/linux/sys/timex.h
+--- ../glibc-2.2.5/sysdeps/unix/sysv/linux/sys/timex.h 2001-07-06
06:56:21.000000000 +0200
++++ glibc-2.2.5/sysdeps/unix/sysv/linux/sys/timex.h 2018-06-09
20:09:07.713806647 +0200
+@@ -54,10 +54,12 @@ struct timex
+ long int errcnt; /* calibration errors (ro) */
+ long int stbcnt; /* stability limit exceeded (ro) */
+
++#if !MES_BOOTSTRAP
+ /* ??? */
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
++#endif
+ };
+
+ /* Mode codes (timex.mode) */
+--- ../glibc-2.2.5/manual/Makefile 2001-08-28 10:05:40.000000000 +0200
++++ glibc-2.2.5/manual/Makefile 2018-06-09 10:13:03.093633660 +0200
+@@ -247,7 +247,11 @@
+ .PHONY: stubs
+ stubs: $(objpfx)stubs
+ endif
+-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
++po/manual.pot $(objpfx)stubs:
++ $(make-target-directory)
++ touch $@
++
++$(objpfx)stamp%:
+ $(make-target-directory)
+ touch $@
+
- 30/30: Revert "REMOVEME: %fake-bootstrap => #t.", (continued)
- 30/30: Revert "REMOVEME: %fake-bootstrap => #t.", Jan Nieuwenhuizen, 2018/06/12
- 23/30: Revert "gnu: gcc-boot: Update to 3.4.0.", Jan Nieuwenhuizen, 2018/06/12
- 11/30: gnu: binutils-boot: Update to 2.10.1., Jan Nieuwenhuizen, 2018/06/12
- 14/30: gnu: binutils-boot: Update to 2.30., Jan Nieuwenhuizen, 2018/06/12
- 21/30: gnu: gcc-boot: Update to 3.2., Jan Nieuwenhuizen, 2018/06/12
- 28/30: gnu: Add gcc-core-boot 2.95.3., Jan Nieuwenhuizen, 2018/06/12
- 24/30: Revert "gnu: gcc-boot: Update to 3.2.", Jan Nieuwenhuizen, 2018/06/12
- 20/30: gnu: gcc-boot: Update to 3.0., Jan Nieuwenhuizen, 2018/06/12
- 15/30: Revert "gnu: binutils-boot: Update to 2.30.", Jan Nieuwenhuizen, 2018/06/12
- 17/30: gnu: gcc-boot: Update to 2.6.3., Jan Nieuwenhuizen, 2018/06/12
- 27/30: gnu: glibc-boot: Update to 2.2.5.,
Jan Nieuwenhuizen <=
- 25/30: Revert "gnu: gcc-boot: Update to 3.0.", Jan Nieuwenhuizen, 2018/06/12
- 19/30: gnu: gcc-boot: Update to 2.95.3., Jan Nieuwenhuizen, 2018/06/12
- 13/30: gnu: binutils-boot: Update to 2.25., Jan Nieuwenhuizen, 2018/06/12
- 16/30: Revert "gnu: binutils-boot: Update to 2.25.", Jan Nieuwenhuizen, 2018/06/12
- 26/30: gnu: Add glibc-boot 2.0.1., Jan Nieuwenhuizen, 2018/06/12