[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
183/192: gnu: gcc-core-mesboot: Cleanup.
From: |
Jan Nieuwenhuizen |
Subject: |
183/192: gnu: gcc-core-mesboot: Cleanup. |
Date: |
Mon, 3 Sep 2018 16:25:24 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 38f907cf305f6cdac85d8bea8987a1042fd23a6b
Author: Jan Nieuwenhuizen <address@hidden>
Date: Mon Sep 3 14:09:48 2018 +0200
gnu: gcc-core-mesboot: Cleanup.
* gnu/packages/commencement.scm (gcc-core-mesboot): Cleanup.
---
gnu/packages/commencement.scm | 98 +++++++++++++++++++++----------------------
1 file changed, 49 insertions(+), 49 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index be89ed3..c929282 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -721,6 +721,7 @@
(native-inputs `(("binutils" ,binutils-mesboot0)
("tcc" ,tcc-boot)
+ ("bash" ,%bootstrap-coreutils&co)
("coreutils" ,%bootstrap-coreutils&co)
("diffutils" ,diffutils-mesboot)
("make" ,make-mesboot0)))
@@ -731,6 +732,14 @@
#:tests? #f
#:parallel-build? #f
#:strip-binaries? #f
+ #:configure-flags
+ (let ((out (assoc-ref %outputs "out")))
+ `("--enable-static"
+ "--disable-shared"
+ "--disable-werror"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ ,(string-append "--prefix=" out)))
#:make-flags (list
"CC=tcc -static -D __GLIBC_MINOR__=6"
"OLDCC=tcc -static -D __GLIBC_MINOR__=6"
@@ -749,55 +758,33 @@
(srfi srfi-1))
#:phases
(modify-phases %standard-phases
- (replace 'configure
+ ;; gcc-2.95.3 needs more traditional configure
+ (add-before 'configure 'setenv
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
(tcc (assoc-ref %build-inputs "tcc"))
- (cppflags (string-append
- " -D __STDC__=1"
- " -D __GLIBC_MINOR__=6")))
- (setenv "PATH"
- (string-append
- (assoc-ref %build-inputs "binutils") "/bin"
- ":" (assoc-ref %build-inputs "tcc") "/bin"
-
- ":" (assoc-ref %build-inputs "coreutils") "/bin"
- ":" (assoc-ref %build-inputs "diffutils") "/bin"
- ":" (assoc-ref %build-inputs "make") "/bin"))
-
- ;; no info at this stage
- (delete-file-recursively "texinfo")
- (system "touch gcc/cpp.info gcc/gcc.info")
-
- (setenv "CONFIG_SHELL" (string-append
- (assoc-ref %build-inputs "coreutils")
- "/bin/sh"))
- (unsetenv "LANG")
- (unsetenv "C_INCLUDE_PATH") ; flex
- (unsetenv "LIBRARY_PATH")
+ (cppflags " -D __GLIBC_MINOR__=6"))
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
(setenv "CPPFLAGS" cppflags)
- (setenv "C_INCLUDE_PATH" (string-append tcc "/include"))
- (setenv "CC" (string-append "tcc -static" " " cppflags))
- (setenv "CC_FOR_BUILD" (string-append "tcc -static" " "
cppflags))
- (setenv "CPP" (string-append "tcc -E" " " cppflags))
-
- (format (current-error-port) "PATH=~a\n" (getenv "PATH"))
- (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv
"C_INCLUDE_PATH"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv
"LIBRARY_PATH"))
-
+ (setenv "CC" (string-append "tcc" cppflags))
+ (setenv "CC_FOR_BUILD" (string-append "tcc" cppflags))
+ (setenv "CPP" (string-append "tcc -E" cppflags))
(with-output-to-file "config.cache"
(lambda _
(display "
ac_cv_c_float_format='IEEE (little-endian)'
-")))
- (and
- (zero?
- (system* "./configure"
- "--disable-shared"
- "--enable-static"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- (string-append "--prefix=" out)))))))
+"))))))
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join configure-flags))
+ (apply invoke "./configure" configure-flags)))
+ (add-after 'configure 'remove-info
+ (lambda _
+ ;; no info at this stage
+ (delete-file-recursively "texinfo")
+ (invoke "touch" "gcc/cpp.info" "gcc/gcc.info")))
(add-after 'install 'install2
(lambda* (#:key outputs #:allow-other-keys)
(let* ((tcc (assoc-ref %build-inputs "tcc"))
@@ -812,15 +799,28 @@ ac_cv_c_float_format='IEEE (little-endian)'
(copy-file "gcc/libgcc2.a" (string-append out
"/lib/libgcc2.a"))
(copy-file (string-append tcc "/lib/libtcc1.a")
(string-append out "/lib/libtcc1.a"))
- (zero? (system* "ar" "r" (string-append gcc-dir "/libc.a")
- (string-append tcc-lib "/libc+gnu.o")
- (string-append tcc-lib "/libtcc1.o")))
- (zero? (system* "ar" "r" (string-append out "/lib/libc.a")
- (string-append tcc-lib "/libc+gnu.o")
- (string-append tcc-lib "/libtcc1.o")))
- (system* "ls" "-ltrF" gcc-dir)
+ (invoke "ar" "r" (string-append gcc-dir "/libc.a")
+ (string-append tcc-lib "/libc+gnu.o")
+ (string-append tcc-lib "/libtcc1.o"))
+ (invoke "ar" "r" (string-append out "/lib/libc.a")
+ (string-append tcc-lib "/libc+gnu.o")
+ (string-append tcc-lib "/libtcc1.o"))
+ (invoke "ls" "-ltrF" gcc-dir)
(copy-recursively (string-append tcc "/include")
- (string-append out "/include"))))))))))))
+ (string-append out "/include"))
+ #t)))))))
+ (native-search-paths
+ ;; Use the language-specific variables rather than 'CPATH' because they
+ ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
+ ;; The intent is to allow headers that are in the search path to be
+ ;; treated as "system headers" (headers exempt from warnings) just like
+ ;; the typical /usr/include headers on an FHS system.
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("include"
"/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib"))))))))
(define-public mesboot-headers
(package-with-bootstrap-guile
- 164/192: gnu: Add gcc-mesboot-wrapper 4.7.4., (continued)
- 164/192: gnu: Add gcc-mesboot-wrapper 4.7.4., Jan Nieuwenhuizen, 2018/09/03
- 167/192: gnu: gcc-mesboot: Enable c++ too., Jan Nieuwenhuizen, 2018/09/03
- 176/192: mescc-tools-boot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 175/192: gnu: glibc-mesboot: Remove %bootstrap-glibc., Jan Nieuwenhuizen, 2018/09/03
- 184/192: gnu: mesboot-headers: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 179/192: gnu: tcc-boot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 180/192: gnu: make-mesboot0: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 189/192: gnu: make-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 187/192: gnu: make-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 177/192: gnu: mes-boot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 183/192: gnu: gcc-core-mesboot: Cleanup.,
Jan Nieuwenhuizen <=
- 185/192: gnu: glibc-mesboot0: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 65/192: gnu: binutils-boot: Update to 2.25., Jan Nieuwenhuizen, 2018/09/03
- 191/192: gnu: glibc-headers-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 190/192: gnu: gcc-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 192/192: gnu: glibc-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 173/192: gnu: Add mesboot-headers., Jan Nieuwenhuizen, 2018/09/03
- 186/192: gnu: gcc-mesboot0: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 188/192: gnu: binutils-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 145/192: bootstrap: Integrate mes bootstrap for i686-linux., Jan Nieuwenhuizen, 2018/09/03
- 174/192: gnu: glibc-mesboot: Update to 2.16.0., Jan Nieuwenhuizen, 2018/09/03