guix-commits
[Top][All Lists]
Advanced

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

90/160: gnu: glibc-boot: Install all headers. WIP plus more


From: Jan Nieuwenhuizen
Subject: 90/160: gnu: glibc-boot: Install all headers. WIP plus more
Date: Tue, 28 Aug 2018 15:56:25 -0400 (EDT)

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

commit 22da1ec9a3f196631018b67399e5715b4bf4d01f
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Jun 17 20:48:13 2018 +0200

    gnu: glibc-boot: Install all headers. WIP plus more
    
    * gnu/packages/mes.scm (glibc-boot): Install all headers.
---
 gnu/packages/mes.scm                        |  33 +++++---
 gnu/packages/patches/glibc-boot-2.2.5.patch | 118 +++++++++++++++++++++++++---
 2 files changed, 132 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index bf40cab..ff9ec3d 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -693,9 +693,9 @@ ac_cv_c_float_format='IEEE (little-endian)'
                (base32
                 "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
     (supported-systems '("i686-linux"))
-    (native-inputs `(("binutils" ,binutils-boot)
-                     ("gcc" ,gcc-core-boot)))
-    (propagated-inputs `(("kernel-headers" ,(linux-libre-headers-boot0))))
+    (native-inputs `(("binutils" ,binutils-boot0)
+                     ("gcc" ,gcc-core-boot)
+                     ("kernel-headers" ,(linux-libre-headers-boot0))))
     (outputs '("out"))
     (arguments
      `(#:tests? #f
@@ -718,7 +718,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
           "--without-gd"
           "--without-tls"
           (string-append "--prefix=" out)))
-       #:make-flags '("lib")
        #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'setenv
@@ -728,11 +727,29 @@ ac_cv_c_float_format='IEEE (little-endian)'
                     (gcc (assoc-ref %build-inputs "gcc"))
                     (cppflags (string-append
                                " -D __STDC__=1"
-                               " -D MES_BOOTSTRAP=1"))
+                               " -D MES_BOOTSTRAP=1"
+                               " -D BOOTSTRAP_GLIBC=1"))
                     (cflags (string-append " -L " (getcwd))))
                (setenv "CONFIG_SHELL" (string-append
                                        (assoc-ref %build-inputs "bash")
                                        "/bin/sh"))
+
+               (setenv "PATH"
+                       (string-append
+                        (assoc-ref %build-inputs "binutils") "/bin"
+                        ":" (assoc-ref %build-inputs "gcc") "/bin"
+
+                        ;; more bootstrap cheats
+                        ":" (assoc-ref %build-inputs "bash") "/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 "CPP" (string-append gcc "/bin/gcc -E " cppflags))
                (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
                (unsetenv "C_INCLUDE_PATH")
@@ -742,11 +759,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
          (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)))))))))
+              (apply system* "./configure" configure-flags)))))))))
 
 (define-public gcc-boot
   (package
diff --git a/gnu/packages/patches/glibc-boot-2.2.5.patch 
b/gnu/packages/patches/glibc-boot-2.2.5.patch
index e8b9c52..34932f8 100644
--- a/gnu/packages/patches/glibc-boot-2.2.5.patch
+++ b/gnu/packages/patches/glibc-boot-2.2.5.patch
@@ -1,4 +1,4 @@
-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
+cdiff -purN -x .git -x fubar -x fubar.c -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 @@
@@ -28,7 +28,21 @@ odiff -purN -x .git -x Makefile -x config.status -x config.h 
-x BOOT -x BOOT-GCC
 +
 +
 +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
+diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x 
config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/config.h.in 
glibc-2.2.5/config.h.in
+--- ../glibc-2.2.5/config.h.in 2001-11-16 02:02:56.000000000 +0100
++++ glibc-2.2.5/config.h.in    2018-06-17 21:30:02.313029074 +0200
+@@ -1,3 +1,10 @@
++#if MES_BOOTSTRAP && BOOTSTRAP_GLIBC
++#undef __umoddi3
++#define __umoddi3(a,b) ((a)%(b))
++#undef __udivdi3
++#define __udivdi3(a,b) ((a)/(b))
++#endif
++
+ #if !defined ASSEMBLER && !defined _ISOMAC && !defined __OPTIMIZE__
+ # error "glibc cannot be compiled without optimization"
+ #endif
+diff -purN -x .git -x fubar -x fubar.c -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
@@ -40,9 +54,65 @@ diff -purN -x .git -x Makefile -x config.status -x config.h 
-x BOOT -x BOOT-GCC
         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
+Binary files ../glibc-2.2.5/csu/a.out and glibc-2.2.5/csu/a.out differ
+diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x 
config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/dummy.d 
glibc-2.2.5/dummy.d
+--- ../glibc-2.2.5/dummy.d     1970-01-01 01:00:00.000000000 +0100
++++ glibc-2.2.5/dummy.d        2018-06-16 20:12:56.609317521 +0200
+@@ -0,0 +1 @@
++# .s files cannot contain includes, so they need no deps.
+diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x 
config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/FUBAR 
glibc-2.2.5/FUBAR
+--- ../glibc-2.2.5/FUBAR       1970-01-01 01:00:00.000000000 +0100
++++ glibc-2.2.5/FUBAR  2018-06-20 15:01:45.378954459 +0200
+@@ -0,0 +1,6 @@
++(echo '#include <sysdep.h>'; \
++ echo 'PSEUDO (__kill, kill, 2)'; \
++ echo '       ret'; \
++ echo 'PSEUDO_END(__kill)'; \
++ echo 'weak_alias (__kill, kill)'; \
++) | tee foobar.c | gcc -D__STDC__=1 -D BOOTSTRAP_GLIBC=1 -DMES_BOOTSTRAP=1  
-c  -I../include -I.  -I.. -I../libio  -I../sysdeps/i386/elf 
-I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu 
-I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet 
-I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/fpu -I../sysdeps/i386 
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-9 [...]
+diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x 
config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' 
../glibc-2.2.5/iconv/libgcc2.a glibc-2.2.5/iconv/libgcc2.a
+--- ../glibc-2.2.5/iconv/libgcc2.a     1970-01-01 01:00:00.000000000 +0100
++++ glibc-2.2.5/iconv/libgcc2.a        2018-06-17 20:25:42.010689888 +0200
+@@ -0,0 +1 @@
++!<arch>
+diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x 
config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' 
../glibc-2.2.5/iconv/libgcc2_p.a glibc-2.2.5/iconv/libgcc2_p.a
+--- ../glibc-2.2.5/iconv/libgcc2_p.a   1970-01-01 01:00:00.000000000 +0100
++++ glibc-2.2.5/iconv/libgcc2_p.a      2018-06-17 20:25:42.010689888 +0200
+@@ -0,0 +1 @@
++!<arch>
+diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x 
config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/Makeconfig 
glibc-2.2.5/Makeconfig
+--- ../glibc-2.2.5/Makeconfig  2001-09-12 20:49:45.000000000 +0200
++++ glibc-2.2.5/Makeconfig     2018-06-20 16:33:35.472167202 +0200
+@@ -400,7 +400,7 @@ ifndef +link
+                                                    $(start-installed-name))\
+                          $(+preinit) $(link-extra-libs) \
+                          $(common-objpfx)libc% $(+postinit),$^) \
+-            $(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
++            $(link-extra-libs) $(link-libc) $(+postctor) $(+postinit) -lc 
-lgcc2
+ endif
+ # Command for statically linking programs with the C library.
+ ifndef +link-static
+@@ -412,7 +412,7 @@ ifndef +link-static
+                                                    $(start-installed-name))\
+                          $(+preinit) $(link-extra-libs-static) \
+                          $(common-objpfx)libc% $(+postinit),$^) \
+-            $(link-extra-libs-static) $(link-libc-static) $(+postctor) 
$(+postinit)
++            $(link-extra-libs-static) $(link-libc-static) $(+postctor) 
$(+postinit) -lc -lgcc2
+ endif
+ # Command for statically linking bounded-pointer programs with the C library.
+ ifndef +link-bounded
+@@ -424,7 +424,7 @@ ifndef +link-bounded
+                                                    $(start-installed-name))\
+                          $(+preinit) $(link-extra-libs-bounded) \
+                          $(common-objpfx)libc% $(+postinit),$^) \
+-            $(link-extra-libs-bounded) $(link-libc-bounded) $(+postctor) 
$(+postinit)
++            $(link-extra-libs-bounded) $(link-libc-bounded) $(+postctor) 
$(+postinit) -lc -lgcc2
+ endif
+ ifndef config-LDFLAGS
+ ifeq (yesyes,$(build-shared)$(elf))
+diff -purN -x .git -x fubar -x fubar.c -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
++++ glibc-2.2.5/Makerules      2018-06-10 15:03:42.390329860 +0200
 @@ -748,6 +748,18 @@ endef
  installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
                             $(inst_libdir)/$(patsubst %,$(libtype$o),\
@@ -62,7 +132,7 @@ diff -purN -x .git -x Makefile -x config.status -x config.h 
-x BOOT -x BOOT-GCC
  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
+diff -purN -x .git -x fubar -x fubar.c -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)
@@ -133,7 +203,7 @@ diff -purN -x .git -x Makefile -x config.status -x config.h 
-x BOOT -x BOOT-GCC
  }
  
  #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
+diff -purN -x .git -x fubar -x fubar.c -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
@@ -145,7 +215,16 @@ diff -purN -x .git -x Makefile -x config.status -x 
config.h -x BOOT -x BOOT-GCC
        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
+diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x 
config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' 
../glibc-2.2.5/signal/foobar.c glibc-2.2.5/signal/foobar.c
+--- ../glibc-2.2.5/signal/foobar.c     1970-01-01 01:00:00.000000000 +0100
++++ glibc-2.2.5/signal/foobar.c        2018-06-20 15:01:39.990866066 +0200
+@@ -0,0 +1,5 @@
++#include <sysdep.h>
++PSEUDO (__kill, kill, 2)
++      ret
++PSEUDO_END(__kill)
++weak_alias (__kill, kill)
+diff -purN -x .git -x fubar -x fubar.c -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
@@ -157,7 +236,7 @@ diff -purN -x .git -x Makefile -x config.status -x config.h 
-x BOOT -x BOOT-GCC
  /* 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
+diff -purN -x .git -x fubar -x fubar.c -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)
@@ -171,7 +250,28 @@ diff -purN -x .git -x Makefile -x config.status -x 
config.h -x BOOT -x BOOT-GCC
  
    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
+diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x 
config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' 
../glibc-2.2.5/sysdeps/unix/make-syscalls.sh 
glibc-2.2.5/sysdeps/unix/make-syscalls.sh
+--- ../glibc-2.2.5/sysdeps/unix/make-syscalls.sh       2001-09-13 
00:19:30.000000000 +0200
++++ glibc-2.2.5/sysdeps/unix/make-syscalls.sh  2018-06-20 15:16:01.813004453 
+0200
+@@ -173,7 +173,7 @@ shared-only-routines += $file
+   done
+ 
+   # And finally, pipe this all into the compiler.
+-  echo '      ) | $(COMPILE.S) -x assembler-with-cpp -o $@ -'
++  echo '      ) > fubar.c; $(COMPILE.S) -x assembler-with-cpp -o $@ fubar.c'
+ 
+   case $weak in
+   address@hidden)
+@@ -284,7 +284,7 @@ shared-only-routines += $file
+     echo "\
+        echo ''; \\
+        echo '#include <bp-thunks.h>'; \\
+-      ) | \$(COMPILE.c) -x c -o \$@ -"
++      ) > fubar.c; \$(COMPILE.c) -x c -o \$@ fubar.c"
+ ### Use this for debugging intermediate output:
+ ###   ) >\$(@:.ob=.c)
+ ###   \$(subst -c,-E,\$(COMPILE.c)) -o \$(@:.ob=.ib) \$(@:.ob=.c)
+diff -purN -x .git -x fubar -x fubar.c -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



reply via email to

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