2013-01-06 00:47:50 +01:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2018-01-10 10:02:44 +01:00
|
|
|
|
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
2017-02-03 15:24:34 +01:00
|
|
|
|
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
|
2018-02-20 04:29:41 +01:00
|
|
|
|
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
2019-08-12 04:37:12 +02:00
|
|
|
|
;;; Copyright © 2018, 2019 Mark H Weaver <mhw@netris.org>
|
2019-08-29 23:19:18 +02:00
|
|
|
|
;;; Copyright © 2018, 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2019-02-27 20:39:13 +01:00
|
|
|
|
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
|
;;; This file is part of GNU Guix.
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
|
;;; your option) any later version.
|
|
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
|
;;;
|
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
2013-01-06 00:47:50 +01:00
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
2013-01-18 01:06:24 +01:00
|
|
|
|
(define-module (gnu packages make-bootstrap)
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
#:use-module (guix utils)
|
|
|
|
|
#:use-module (guix packages)
|
2018-08-21 03:20:19 +02:00
|
|
|
|
#:use-module ((guix licenses) #:select (gpl3+))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
#:use-module (guix build-system trivial)
|
2013-01-01 16:55:34 +01:00
|
|
|
|
#:use-module (guix build-system gnu)
|
2013-01-18 01:06:47 +01:00
|
|
|
|
#:use-module ((gnu packages) #:select (search-patch))
|
2013-01-18 01:06:24 +01:00
|
|
|
|
#:use-module (gnu packages base)
|
2013-06-25 23:39:14 +02:00
|
|
|
|
#:use-module (gnu packages cross-base)
|
2013-01-18 01:06:24 +01:00
|
|
|
|
#:use-module (gnu packages bash)
|
|
|
|
|
#:use-module (gnu packages compression)
|
|
|
|
|
#:use-module (gnu packages gawk)
|
2013-03-27 23:47:54 +01:00
|
|
|
|
#:use-module (gnu packages gcc)
|
2013-01-18 01:06:24 +01:00
|
|
|
|
#:use-module (gnu packages guile)
|
2013-02-13 21:42:34 +01:00
|
|
|
|
#:use-module (gnu packages bdw-gc)
|
2018-08-21 03:20:19 +02:00
|
|
|
|
#:use-module (gnu packages libunistring)
|
2013-01-18 01:06:24 +01:00
|
|
|
|
#:use-module (gnu packages linux)
|
2016-11-30 15:49:48 +01:00
|
|
|
|
#:use-module (gnu packages hurd)
|
2018-10-20 08:59:19 +02:00
|
|
|
|
#:use-module (gnu packages mes)
|
2013-01-18 01:06:24 +01:00
|
|
|
|
#:use-module (gnu packages multiprecision)
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
#:use-module (ice-9 match)
|
2012-12-20 01:29:56 +01:00
|
|
|
|
#:use-module (srfi srfi-1)
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
#:export (%bootstrap-binaries-tarball
|
2018-09-09 11:49:04 +02:00
|
|
|
|
%linux-libre-headers-bootstrap-tarball
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
%binutils-bootstrap-tarball
|
|
|
|
|
%glibc-bootstrap-tarball
|
|
|
|
|
%gcc-bootstrap-tarball
|
2013-01-05 15:46:08 +01:00
|
|
|
|
%guile-bootstrap-tarball
|
2018-11-16 19:29:55 +01:00
|
|
|
|
%mescc-tools-bootstrap-tarball
|
2018-10-20 08:59:19 +02:00
|
|
|
|
%mes-bootstrap-tarball
|
2014-05-06 15:01:39 +02:00
|
|
|
|
%bootstrap-tarballs
|
|
|
|
|
|
|
|
|
|
%guile-static-stripped))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
;;;
|
2013-08-21 11:38:51 +02:00
|
|
|
|
;;; This module provides tools to build tarballs of the "bootstrap binaries"
|
2013-01-18 01:06:24 +01:00
|
|
|
|
;;; used in (gnu packages bootstrap). These statically-linked binaries are
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
;;; taken for granted and used as the root of the whole bootstrap procedure.
|
|
|
|
|
;;;
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
2013-06-25 23:39:14 +02:00
|
|
|
|
(define* (glibc-for-bootstrap #:optional (base glibc))
|
2013-06-14 15:29:08 +02:00
|
|
|
|
"Return a libc deriving from BASE whose `system' and `popen' functions looks
|
|
|
|
|
for `sh' in $PATH, and without nscd, and with static NSS modules."
|
|
|
|
|
(package (inherit base)
|
gnu: Use the 'patches' field of <origin>.
* gnu/packages/apr.scm,
gnu/packages/autotools.scm,
gnu/packages/avahi.scm,
gnu/packages/cdrom.scm,
gnu/packages/cmake.scm,
gnu/packages/cpio.scm,
gnu/packages/cross-base.scm,
gnu/packages/emacs.scm,
gnu/packages/flex.scm,
gnu/packages/fontutils.scm,
gnu/packages/glib.scm,
gnu/packages/grub.scm,
gnu/packages/guile.scm,
gnu/packages/idutils.scm,
gnu/packages/libevent.scm,
gnu/packages/linux.scm,
gnu/packages/mail.scm,
gnu/packages/make-bootstrap.scm,
gnu/packages/mp3.scm,
gnu/packages/oggvorbis.scm,
gnu/packages/pdf.scm,
gnu/packages/plotutils.scm,
gnu/packages/qemu.scm,
gnu/packages/recutils.scm,
gnu/packages/rush.scm,
gnu/packages/scheme.scm,
gnu/packages/system.scm,
gnu/packages/tcsh.scm,
gnu/packages/valgrind.scm,
gnu/packages/vpn.scm,
gnu/packages/w3m: Use the 'patches' field of <origin> instead of
adding a patch as input plus using #:patches.
2013-10-09 00:09:04 +02:00
|
|
|
|
(source (origin (inherit (package-source base))
|
|
|
|
|
(patches (cons (search-patch "glibc-bootstrap-system.patch")
|
|
|
|
|
(origin-patches (package-source base))))))
|
2012-12-20 01:29:56 +01:00
|
|
|
|
(arguments
|
2013-06-14 15:29:08 +02:00
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 23:21:59 +01:00
|
|
|
|
((#:configure-flags flags)
|
2013-06-25 23:39:14 +02:00
|
|
|
|
;; Arrange so that getaddrinfo & co. do not contact the nscd,
|
|
|
|
|
;; and can use statically-linked NSS modules.
|
|
|
|
|
`(cons* "--disable-nscd" "--disable-build-nscd"
|
|
|
|
|
"--enable-static-nss"
|
2013-11-03 22:35:17 +01:00
|
|
|
|
,flags))))
|
|
|
|
|
|
|
|
|
|
;; Remove the 'debug' output to allow bit-reproducible builds (when the
|
|
|
|
|
;; 'debug' output is used, ELF files end up with a .gnu_debuglink, which
|
|
|
|
|
;; includes a CRC of the corresponding debugging symbols; those symbols
|
|
|
|
|
;; contain store file names, so the CRC changes at every rebuild.)
|
|
|
|
|
(outputs (delete "debug" (package-outputs base)))))
|
2013-06-14 15:29:08 +02:00
|
|
|
|
|
|
|
|
|
(define (package-with-relocatable-glibc p)
|
|
|
|
|
"Return a variant of P that uses the libc as defined by
|
|
|
|
|
`glibc-for-bootstrap'."
|
|
|
|
|
|
2013-06-25 23:39:14 +02:00
|
|
|
|
(define (cross-bootstrap-libc)
|
|
|
|
|
(let ((target (%current-target-system)))
|
|
|
|
|
(glibc-for-bootstrap
|
|
|
|
|
;; `cross-libc' already returns a cross libc, so clear
|
|
|
|
|
;; %CURRENT-TARGET-SYSTEM.
|
|
|
|
|
(parameterize ((%current-target-system #f))
|
|
|
|
|
(cross-libc target)))))
|
|
|
|
|
|
|
|
|
|
;; Standard inputs with the above libc and corresponding GCC.
|
|
|
|
|
|
|
|
|
|
(define (inputs)
|
|
|
|
|
(if (%current-target-system) ; is this package cross built?
|
|
|
|
|
`(("cross-libc" ,(cross-bootstrap-libc)))
|
|
|
|
|
'()))
|
|
|
|
|
|
|
|
|
|
(define (native-inputs)
|
|
|
|
|
(if (%current-target-system)
|
2019-06-21 09:37:21 +02:00
|
|
|
|
(let* ((target (%current-target-system))
|
|
|
|
|
(xgcc (cross-gcc
|
|
|
|
|
target
|
|
|
|
|
#:xbinutils (cross-binutils target)
|
|
|
|
|
#:libc (cross-bootstrap-libc))))
|
|
|
|
|
`(("cross-gcc" ,(package
|
|
|
|
|
(inherit xgcc)
|
|
|
|
|
(search-paths
|
|
|
|
|
;; Ensure the cross libc headers appears on the
|
|
|
|
|
;; C++ system header search path.
|
|
|
|
|
(cons (search-path-specification
|
|
|
|
|
(variable "CROSS_CPLUS_INCLUDE_PATH")
|
|
|
|
|
(files '("include")))
|
|
|
|
|
(package-search-paths gcc)))))
|
2013-06-25 23:39:14 +02:00
|
|
|
|
("cross-binutils" ,(cross-binutils target))
|
2016-11-04 15:16:11 +01:00
|
|
|
|
,@(%final-inputs)))
|
2013-06-25 23:39:14 +02:00
|
|
|
|
`(("libc" ,(glibc-for-bootstrap))
|
2018-01-10 10:02:44 +01:00
|
|
|
|
("libc:static" ,(glibc-for-bootstrap) "static")
|
2015-06-26 17:06:30 +02:00
|
|
|
|
("gcc" ,(package (inherit gcc)
|
2019-02-27 20:39:13 +01:00
|
|
|
|
(outputs '("out")) ;all in one so libgcc_s is easily found
|
2019-06-21 09:37:21 +02:00
|
|
|
|
(native-search-paths
|
|
|
|
|
;; Set CPLUS_INCLUDE_PATH so GCC is able to find the libc
|
|
|
|
|
;; C++ headers.
|
|
|
|
|
(cons (search-path-specification
|
|
|
|
|
(variable "CPLUS_INCLUDE_PATH")
|
|
|
|
|
(files '("include")))
|
|
|
|
|
(package-native-search-paths gcc)))
|
2013-06-25 23:39:14 +02:00
|
|
|
|
(inputs
|
2019-02-27 20:39:13 +01:00
|
|
|
|
`(;; Distinguish the name so we can refer to it below.
|
|
|
|
|
("bootstrap-libc" ,(glibc-for-bootstrap))
|
2018-01-10 10:02:44 +01:00
|
|
|
|
("libc:static" ,(glibc-for-bootstrap) "static")
|
2019-02-27 20:39:13 +01:00
|
|
|
|
,@(package-inputs gcc)))
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments gcc)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-before 'configure 'treat-glibc-as-system-header
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(let ((libc (assoc-ref inputs "bootstrap-libc")))
|
|
|
|
|
;; GCCs build processes requires that the libc
|
|
|
|
|
;; we're building against is on the system header
|
|
|
|
|
;; search path.
|
|
|
|
|
(for-each (lambda (var)
|
|
|
|
|
(setenv var (string-append libc "/include")))
|
|
|
|
|
'("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"))
|
|
|
|
|
#t)))))))))
|
2016-11-04 15:16:11 +01:00
|
|
|
|
,@(fold alist-delete (%final-inputs) '("libc" "gcc")))))
|
2013-06-14 15:29:08 +02:00
|
|
|
|
|
|
|
|
|
(package-with-explicit-inputs p inputs
|
2013-06-25 23:39:14 +02:00
|
|
|
|
(current-source-location)
|
|
|
|
|
#:native-inputs native-inputs))
|
2012-12-20 01:29:56 +01:00
|
|
|
|
|
2019-08-12 04:37:12 +02:00
|
|
|
|
(define static-bash-for-bootstrap
|
|
|
|
|
(package
|
|
|
|
|
(inherit static-bash)
|
|
|
|
|
(source (origin
|
|
|
|
|
(inherit (package-source static-bash))
|
|
|
|
|
(patches
|
|
|
|
|
(cons (search-patch "bash-4.4-linux-pgrp-pipe.patch")
|
|
|
|
|
(origin-patches (package-source static-bash))))))))
|
|
|
|
|
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(define %static-inputs
|
|
|
|
|
;; Packages that are to be used as %BOOTSTRAP-INPUTS.
|
|
|
|
|
(let ((coreutils (package (inherit coreutils)
|
2013-06-14 14:50:33 +02:00
|
|
|
|
(arguments
|
|
|
|
|
`(#:configure-flags
|
|
|
|
|
'("--disable-nls"
|
|
|
|
|
"--disable-silent-rules"
|
|
|
|
|
"--enable-no-install-program=stdbuf,libstdbuf.so"
|
|
|
|
|
"CFLAGS=-Os -g0" ; smaller, please
|
2019-06-21 09:33:31 +02:00
|
|
|
|
"LDFLAGS=-static -pthread"
|
|
|
|
|
|
|
|
|
|
;; Work around a cross-compilation bug whereby libcoreutils.a
|
|
|
|
|
;; would provide '__mktime_internal', which conflicts with the
|
|
|
|
|
;; one in libc.a.
|
|
|
|
|
,@(if (%current-target-system)
|
|
|
|
|
`("gl_cv_func_working_mktime=yes")
|
|
|
|
|
'()))
|
|
|
|
|
|
2013-06-14 14:50:33 +02:00
|
|
|
|
#:tests? #f ; signal-related Gnulib tests fail
|
|
|
|
|
,@(package-arguments coreutils)))
|
2013-01-04 18:58:53 +01:00
|
|
|
|
|
2013-06-14 14:50:33 +02:00
|
|
|
|
;; Remove optional dependencies such as GMP. Keep Perl
|
|
|
|
|
;; except if it's missing (which is the case when
|
|
|
|
|
;; cross-compiling).
|
|
|
|
|
(inputs (match (assoc "perl" (package-inputs coreutils))
|
|
|
|
|
(#f '())
|
2013-08-28 22:43:01 +02:00
|
|
|
|
(x (list x))))
|
|
|
|
|
|
2013-11-03 22:35:17 +01:00
|
|
|
|
;; Remove the 'debug' output (see above for the reason.)
|
2013-08-28 22:43:01 +02:00
|
|
|
|
(outputs '("out"))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(bzip2 (package (inherit bzip2)
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments bzip2)
|
|
|
|
|
((#:phases phases)
|
2018-02-20 04:29:41 +01:00
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-before 'build 'dash-static
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "Makefile"
|
|
|
|
|
(("^LDFLAGS[[:blank:]]*=.*$")
|
|
|
|
|
"LDFLAGS = -static"))
|
|
|
|
|
#t))))))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(xz (package (inherit xz)
|
2018-12-12 20:08:28 +01:00
|
|
|
|
(outputs '("out"))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(arguments
|
|
|
|
|
`(#:strip-flags '("--strip-all")
|
2018-02-20 04:29:41 +01:00
|
|
|
|
#:phases (modify-phases %standard-phases
|
|
|
|
|
(add-before 'configure 'static-executable
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Ask Libtool for a static executable.
|
|
|
|
|
(substitute* "src/xz/Makefile.in"
|
|
|
|
|
(("^xz_LDADD =")
|
|
|
|
|
"xz_LDADD = -all-static"))
|
|
|
|
|
#t)))))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(gawk (package (inherit gawk)
|
gnu: Use the 'patches' field of <origin>.
* gnu/packages/apr.scm,
gnu/packages/autotools.scm,
gnu/packages/avahi.scm,
gnu/packages/cdrom.scm,
gnu/packages/cmake.scm,
gnu/packages/cpio.scm,
gnu/packages/cross-base.scm,
gnu/packages/emacs.scm,
gnu/packages/flex.scm,
gnu/packages/fontutils.scm,
gnu/packages/glib.scm,
gnu/packages/grub.scm,
gnu/packages/guile.scm,
gnu/packages/idutils.scm,
gnu/packages/libevent.scm,
gnu/packages/linux.scm,
gnu/packages/mail.scm,
gnu/packages/make-bootstrap.scm,
gnu/packages/mp3.scm,
gnu/packages/oggvorbis.scm,
gnu/packages/pdf.scm,
gnu/packages/plotutils.scm,
gnu/packages/qemu.scm,
gnu/packages/recutils.scm,
gnu/packages/rush.scm,
gnu/packages/scheme.scm,
gnu/packages/system.scm,
gnu/packages/tcsh.scm,
gnu/packages/valgrind.scm,
gnu/packages/vpn.scm,
gnu/packages/w3m: Use the 'patches' field of <origin> instead of
adding a patch as input plus using #:patches.
2013-10-09 00:09:04 +02:00
|
|
|
|
(source (origin (inherit (package-source gawk))
|
|
|
|
|
(patches (cons (search-patch "gawk-shell.patch")
|
|
|
|
|
(origin-patches
|
|
|
|
|
(package-source gawk))))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(arguments
|
gnu: Use the 'patches' field of <origin>.
* gnu/packages/apr.scm,
gnu/packages/autotools.scm,
gnu/packages/avahi.scm,
gnu/packages/cdrom.scm,
gnu/packages/cmake.scm,
gnu/packages/cpio.scm,
gnu/packages/cross-base.scm,
gnu/packages/emacs.scm,
gnu/packages/flex.scm,
gnu/packages/fontutils.scm,
gnu/packages/glib.scm,
gnu/packages/grub.scm,
gnu/packages/guile.scm,
gnu/packages/idutils.scm,
gnu/packages/libevent.scm,
gnu/packages/linux.scm,
gnu/packages/mail.scm,
gnu/packages/make-bootstrap.scm,
gnu/packages/mp3.scm,
gnu/packages/oggvorbis.scm,
gnu/packages/pdf.scm,
gnu/packages/plotutils.scm,
gnu/packages/qemu.scm,
gnu/packages/recutils.scm,
gnu/packages/rush.scm,
gnu/packages/scheme.scm,
gnu/packages/system.scm,
gnu/packages/tcsh.scm,
gnu/packages/valgrind.scm,
gnu/packages/vpn.scm,
gnu/packages/w3m: Use the 'patches' field of <origin> instead of
adding a patch as input plus using #:patches.
2013-10-09 00:09:04 +02:00
|
|
|
|
`(;; Starting from gawk 4.1.0, some of the tests for the
|
2013-07-14 16:58:43 +02:00
|
|
|
|
;; plug-in mechanism just fail on static builds:
|
|
|
|
|
;;
|
|
|
|
|
;; ./fts.awk:1: error: can't open shared library `filefuncs' for reading (No such file or directory)
|
|
|
|
|
#:tests? #f
|
|
|
|
|
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 23:21:59 +01:00
|
|
|
|
,@(substitute-keyword-arguments (package-arguments gawk)
|
|
|
|
|
((#:phases phases)
|
2018-02-20 04:29:41 +01:00
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-before 'configure 'no-export-dynamic
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Since we use `-static', remove
|
|
|
|
|
;; `-export-dynamic'.
|
|
|
|
|
(substitute* "configure"
|
|
|
|
|
(("-Wl,-export-dynamic") ""))
|
|
|
|
|
#t)))))))
|
gnu: Use the 'patches' field of <origin>.
* gnu/packages/apr.scm,
gnu/packages/autotools.scm,
gnu/packages/avahi.scm,
gnu/packages/cdrom.scm,
gnu/packages/cmake.scm,
gnu/packages/cpio.scm,
gnu/packages/cross-base.scm,
gnu/packages/emacs.scm,
gnu/packages/flex.scm,
gnu/packages/fontutils.scm,
gnu/packages/glib.scm,
gnu/packages/grub.scm,
gnu/packages/guile.scm,
gnu/packages/idutils.scm,
gnu/packages/libevent.scm,
gnu/packages/linux.scm,
gnu/packages/mail.scm,
gnu/packages/make-bootstrap.scm,
gnu/packages/mp3.scm,
gnu/packages/oggvorbis.scm,
gnu/packages/pdf.scm,
gnu/packages/plotutils.scm,
gnu/packages/qemu.scm,
gnu/packages/recutils.scm,
gnu/packages/rush.scm,
gnu/packages/scheme.scm,
gnu/packages/system.scm,
gnu/packages/tcsh.scm,
gnu/packages/valgrind.scm,
gnu/packages/vpn.scm,
gnu/packages/w3m: Use the 'patches' field of <origin> instead of
adding a patch as input plus using #:patches.
2013-10-09 00:09:04 +02:00
|
|
|
|
(inputs (if (%current-target-system)
|
2019-08-12 04:37:12 +02:00
|
|
|
|
`(("bash" ,static-bash-for-bootstrap))
|
gnu: Use the 'patches' field of <origin>.
* gnu/packages/apr.scm,
gnu/packages/autotools.scm,
gnu/packages/avahi.scm,
gnu/packages/cdrom.scm,
gnu/packages/cmake.scm,
gnu/packages/cpio.scm,
gnu/packages/cross-base.scm,
gnu/packages/emacs.scm,
gnu/packages/flex.scm,
gnu/packages/fontutils.scm,
gnu/packages/glib.scm,
gnu/packages/grub.scm,
gnu/packages/guile.scm,
gnu/packages/idutils.scm,
gnu/packages/libevent.scm,
gnu/packages/linux.scm,
gnu/packages/mail.scm,
gnu/packages/make-bootstrap.scm,
gnu/packages/mp3.scm,
gnu/packages/oggvorbis.scm,
gnu/packages/pdf.scm,
gnu/packages/plotutils.scm,
gnu/packages/qemu.scm,
gnu/packages/recutils.scm,
gnu/packages/rush.scm,
gnu/packages/scheme.scm,
gnu/packages/system.scm,
gnu/packages/tcsh.scm,
gnu/packages/valgrind.scm,
gnu/packages/vpn.scm,
gnu/packages/w3m: Use the 'patches' field of <origin> instead of
adding a patch as input plus using #:patches.
2013-10-09 00:09:04 +02:00
|
|
|
|
'()))))
|
2016-10-18 17:55:55 +02:00
|
|
|
|
(tar (package (inherit tar)
|
|
|
|
|
(arguments
|
2019-06-21 09:33:31 +02:00
|
|
|
|
`(;; Work around a cross-compilation bug whereby libgnu.a would provide
|
|
|
|
|
;; '__mktime_internal', which conflicts with the one in libc.a.
|
|
|
|
|
,@(if (%current-target-system)
|
|
|
|
|
`(#:configure-flags '("gl_cv_func_working_mktime=yes"))
|
|
|
|
|
'())
|
|
|
|
|
,@(substitute-keyword-arguments (package-arguments tar)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(replace 'set-shell-file-name
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Do not use "/bin/sh" to run programs; see
|
|
|
|
|
;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg02272.html>.
|
|
|
|
|
(substitute* "src/system.c"
|
|
|
|
|
(("/bin/sh") "sh")
|
|
|
|
|
(("execv ") "execvp "))
|
|
|
|
|
#t)))))))))
|
2018-02-27 22:46:04 +01:00
|
|
|
|
;; We don't want to retain a reference to /gnu/store in the bootstrap
|
|
|
|
|
;; versions of egrep/fgrep, so we remove the custom phase added since
|
|
|
|
|
;; grep@2.25. The effect is 'egrep' and 'fgrep' look for 'grep' in
|
|
|
|
|
;; $PATH.
|
|
|
|
|
(grep (package
|
|
|
|
|
(inherit grep)
|
|
|
|
|
(inputs '()) ;remove PCRE, which is optional
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments grep)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(delete 'fix-egrep-and-fgrep)))))))
|
2013-06-25 23:39:14 +02:00
|
|
|
|
(finalize (compose static-package
|
|
|
|
|
package-with-relocatable-glibc)))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
`(,@(map (match-lambda
|
|
|
|
|
((name package)
|
2012-12-20 01:29:56 +01:00
|
|
|
|
(list name (finalize package))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
`(("tar" ,tar)
|
|
|
|
|
("gzip" ,gzip)
|
|
|
|
|
("bzip2" ,bzip2)
|
|
|
|
|
("xz" ,xz)
|
|
|
|
|
("patch" ,patch)
|
|
|
|
|
("coreutils" ,coreutils)
|
|
|
|
|
("sed" ,sed)
|
2018-02-27 22:46:04 +01:00
|
|
|
|
("grep" ,grep)
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
("gawk" ,gawk)))
|
2019-08-12 04:37:12 +02:00
|
|
|
|
("bash" ,static-bash-for-bootstrap))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
(define %static-binaries
|
|
|
|
|
(package
|
|
|
|
|
(name "static-binaries")
|
|
|
|
|
(version "0")
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(source #f)
|
|
|
|
|
(inputs %static-inputs)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (ice-9 ftw)
|
|
|
|
|
(ice-9 match)
|
|
|
|
|
(srfi srfi-1)
|
|
|
|
|
(srfi srfi-26)
|
|
|
|
|
(guix build utils))
|
|
|
|
|
|
|
|
|
|
(let ()
|
|
|
|
|
(define (directory-contents dir)
|
|
|
|
|
(map (cut string-append dir "/" <>)
|
|
|
|
|
(scandir dir (negate (cut member <> '("." ".."))))))
|
|
|
|
|
|
|
|
|
|
(define (copy-directory source destination)
|
|
|
|
|
(for-each (lambda (file)
|
|
|
|
|
(format #t "copying ~s...~%" file)
|
|
|
|
|
(copy-file file
|
|
|
|
|
(string-append destination "/"
|
|
|
|
|
(basename file))))
|
|
|
|
|
(directory-contents source)))
|
|
|
|
|
|
|
|
|
|
(let* ((out (assoc-ref %outputs "out"))
|
|
|
|
|
(bin (string-append out "/bin")))
|
|
|
|
|
(mkdir-p bin)
|
|
|
|
|
|
|
|
|
|
;; Copy Coreutils binaries.
|
|
|
|
|
(let* ((coreutils (assoc-ref %build-inputs "coreutils"))
|
|
|
|
|
(source (string-append coreutils "/bin")))
|
|
|
|
|
(copy-directory source bin))
|
|
|
|
|
|
|
|
|
|
;; For the other inputs, copy just one binary, which has the
|
|
|
|
|
;; same name as the input.
|
|
|
|
|
(for-each (match-lambda
|
|
|
|
|
((name . dir)
|
|
|
|
|
(let ((source (string-append dir "/bin/" name)))
|
|
|
|
|
(format #t "copying ~s...~%" source)
|
|
|
|
|
(copy-file source
|
|
|
|
|
(string-append bin "/" name)))))
|
|
|
|
|
(alist-delete "coreutils" %build-inputs))
|
|
|
|
|
|
|
|
|
|
;; But of course, there are exceptions to this rule.
|
|
|
|
|
(let ((grep (assoc-ref %build-inputs "grep")))
|
gnu: Use 'install-file' instead of 'mkdir-p' and 'copy-file' in obvious cases.
* gnu/packages/bioinformatics.scm (bedtools, bowtie, bwa, hisat, samtools,
plink, star): Use 'install-file' instead of 'mkdir-p' + 'copy-file'.
* gnu/packages/check.scm (catch-framework): Likewise.
* gnu/packages/code.scm (global): Likewise.
* gnu/packages/emacs.scm (magit-svn, haskell-mode, emacs-pdf-tools):
Likewise.
* gnu/packages/engineering.scm (fastcap, fasthenry): Likewise.
* gnu/packages/gnuzilla.scm (nss): Likewise.
* gnu/packages/guile.scm (guile-minikanren): Likewise.
* gnu/packages/java.scm (swt): Likewise.
* gnu/packages/make-bootstrap.scm (%static-binaries): Likewise.
* gnu/packages/maths.scm (lpsolve): Likewise.
* gnu/packages/mp3.scm (mpc123): Likewise.
* gnu/packages/ninja.scm (ninja): Likewise.
* gnu/packages/python.scm (python-numpy, python-pyparsing): Likewise.
* gnu/packages/screen.scm (dtach): Likewise.
* gnu/packages/synergy.scm (synergy): Likewise.
* gnu/packages/textutils.scm (utf8proc): Likewise.
* gnu/packages/version-control.scm (git-test-sequence): Likewise.
* gnu/packages/wicd.scm (wicd): Likewise.
2015-08-28 22:22:22 +02:00
|
|
|
|
(install-file (string-append grep "/bin/fgrep") bin)
|
|
|
|
|
(install-file (string-append grep "/bin/egrep") bin))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
;; Clear references to the store path.
|
|
|
|
|
(for-each remove-store-references
|
|
|
|
|
(directory-contents bin))
|
|
|
|
|
|
|
|
|
|
(with-directory-excursion bin
|
|
|
|
|
;; Programs such as Perl's build system want these aliases.
|
|
|
|
|
(symlink "bash" "sh")
|
|
|
|
|
(symlink "gawk" "awk"))
|
|
|
|
|
|
|
|
|
|
#t)))))
|
|
|
|
|
(synopsis "Statically-linked bootstrap binaries")
|
|
|
|
|
(description
|
|
|
|
|
"Binaries used to bootstrap the distribution.")
|
2015-09-06 11:09:33 +02:00
|
|
|
|
(license gpl3+)
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(home-page #f)))
|
|
|
|
|
|
2018-09-09 11:49:04 +02:00
|
|
|
|
(define %linux-libre-headers-stripped
|
|
|
|
|
;; The subset of Linux-Libre-Headers that we need.
|
|
|
|
|
(package (inherit linux-libre-headers)
|
|
|
|
|
(name (string-append (package-name linux-libre-headers) "-stripped"))
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(outputs '("out"))
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils)
|
|
|
|
|
(guix build make-bootstrap))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils)
|
|
|
|
|
(guix build make-bootstrap))
|
|
|
|
|
|
|
|
|
|
(let* ((in (assoc-ref %build-inputs "linux-libre-headers"))
|
|
|
|
|
(out (assoc-ref %outputs "out")))
|
|
|
|
|
(copy-linux-headers out in)
|
|
|
|
|
#t))))
|
|
|
|
|
(inputs `(("linux-libre-headers" ,linux-libre-headers)))))
|
|
|
|
|
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(define %binutils-static
|
|
|
|
|
;; Statically-linked Binutils.
|
|
|
|
|
(package (inherit binutils)
|
|
|
|
|
(name "binutils-static")
|
|
|
|
|
(arguments
|
2013-06-26 17:23:56 +02:00
|
|
|
|
`(#:configure-flags (cons "--disable-gold"
|
|
|
|
|
,(match (memq #:configure-flags
|
|
|
|
|
(package-arguments binutils))
|
|
|
|
|
((#:configure-flags flags _ ...)
|
|
|
|
|
flags)))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
#:strip-flags '("--strip-all")
|
2018-02-20 04:29:41 +01:00
|
|
|
|
#:phases (modify-phases %standard-phases
|
|
|
|
|
(add-before 'configure 'all-static
|
|
|
|
|
(lambda _
|
|
|
|
|
;; The `-all-static' libtool flag can only be passed
|
|
|
|
|
;; after `configure', since configure tests don't use
|
|
|
|
|
;; libtool, and only for executables built with libtool.
|
|
|
|
|
(substitute* '("binutils/Makefile.in"
|
|
|
|
|
"gas/Makefile.in"
|
|
|
|
|
"ld/Makefile.in")
|
|
|
|
|
(("^LDFLAGS =(.*)$" line)
|
|
|
|
|
(string-append line
|
|
|
|
|
"\nAM_LDFLAGS = -static -all-static\n")))
|
|
|
|
|
#t)))))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
(define %binutils-static-stripped
|
|
|
|
|
;; The subset of Binutils that we need.
|
|
|
|
|
(package (inherit %binutils-static)
|
2013-02-06 15:25:08 +01:00
|
|
|
|
(name (string-append (package-name %binutils-static) "-stripped"))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(build-system trivial-build-system)
|
2013-02-06 15:25:08 +01:00
|
|
|
|
(outputs '("out"))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
|
|
|
|
|
(setvbuf (current-output-port) _IOLBF)
|
|
|
|
|
(let* ((in (assoc-ref %build-inputs "binutils"))
|
|
|
|
|
(out (assoc-ref %outputs "out"))
|
|
|
|
|
(bin (string-append out "/bin")))
|
|
|
|
|
(mkdir-p bin)
|
|
|
|
|
(for-each (lambda (file)
|
|
|
|
|
(let ((target (string-append bin "/" file)))
|
|
|
|
|
(format #t "copying `~a'...~%" file)
|
|
|
|
|
(copy-file (string-append in "/bin/" file)
|
|
|
|
|
target)
|
|
|
|
|
(remove-store-references target)))
|
|
|
|
|
'("ar" "as" "ld" "nm" "objcopy" "objdump"
|
|
|
|
|
"ranlib" "readelf" "size" "strings" "strip"))
|
|
|
|
|
#t))))
|
|
|
|
|
(inputs `(("binutils" ,%binutils-static)))))
|
|
|
|
|
|
2016-11-30 15:49:48 +01:00
|
|
|
|
(define (%glibc-stripped)
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
;; GNU libc's essential shared libraries, dynamic linker, and headers,
|
|
|
|
|
;; with all references to store directories stripped. As a result,
|
|
|
|
|
;; libc.so is unusable and need to be patched for proper relocation.
|
2013-06-14 15:29:08 +02:00
|
|
|
|
(let ((glibc (glibc-for-bootstrap)))
|
2012-12-20 01:29:56 +01:00
|
|
|
|
(package (inherit glibc)
|
|
|
|
|
(name "glibc-stripped")
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
2016-11-30 15:49:48 +01:00
|
|
|
|
`(#:modules ((guix build utils)
|
|
|
|
|
(guix build make-bootstrap))
|
2012-12-20 01:29:56 +01:00
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
2016-11-30 15:49:48 +01:00
|
|
|
|
(use-modules (guix build make-bootstrap))
|
|
|
|
|
(make-stripped-libc (assoc-ref %outputs "out")
|
|
|
|
|
(assoc-ref %build-inputs "libc")
|
|
|
|
|
(assoc-ref %build-inputs "kernel-headers")))))
|
|
|
|
|
(inputs `(("kernel-headers"
|
|
|
|
|
,(if (or (and (%current-target-system)
|
|
|
|
|
(hurd-triplet? (%current-target-system)))
|
|
|
|
|
(string-suffix? "-hurd" (%current-system)))
|
|
|
|
|
gnumach-headers
|
|
|
|
|
linux-libre-headers))
|
|
|
|
|
("libc" ,(let ((target (%current-target-system)))
|
2013-06-25 23:39:14 +02:00
|
|
|
|
(if target
|
|
|
|
|
(glibc-for-bootstrap
|
|
|
|
|
(parameterize ((%current-target-system #f))
|
|
|
|
|
(cross-libc target)))
|
2016-11-30 15:49:48 +01:00
|
|
|
|
glibc)))))
|
2018-12-14 17:05:08 +01:00
|
|
|
|
(native-inputs '())
|
|
|
|
|
(propagated-inputs '())
|
2013-04-29 00:28:36 +02:00
|
|
|
|
|
|
|
|
|
;; Only one output.
|
|
|
|
|
(outputs '("out")))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
(define %gcc-static
|
|
|
|
|
;; A statically-linked GCC, with stripped-down functionality.
|
2013-06-14 15:29:08 +02:00
|
|
|
|
(package-with-relocatable-glibc
|
2015-06-26 17:06:30 +02:00
|
|
|
|
(package (inherit gcc)
|
2012-12-20 01:29:56 +01:00
|
|
|
|
(name "gcc-static")
|
2014-06-09 11:58:43 +02:00
|
|
|
|
(outputs '("out")) ; all in one
|
2012-12-20 01:29:56 +01:00
|
|
|
|
(arguments
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 23:21:59 +01:00
|
|
|
|
`(#:modules ((guix build utils)
|
|
|
|
|
(guix build gnu-build-system)
|
|
|
|
|
(srfi srfi-1)
|
|
|
|
|
(srfi srfi-26)
|
|
|
|
|
(ice-9 regex))
|
2015-06-26 17:06:30 +02:00
|
|
|
|
,@(substitute-keyword-arguments (package-arguments gcc)
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 23:21:59 +01:00
|
|
|
|
((#:guile _) #f)
|
|
|
|
|
((#:implicit-inputs? _) #t)
|
|
|
|
|
((#:configure-flags flags)
|
|
|
|
|
`(append (list
|
2014-06-12 23:27:25 +02:00
|
|
|
|
;; We don't need a full bootstrap here.
|
|
|
|
|
"--disable-bootstrap"
|
|
|
|
|
|
|
|
|
|
;; Make sure '-static' is passed where it matters.
|
|
|
|
|
"--with-stage1-ldflags=-static"
|
|
|
|
|
|
2014-06-13 17:57:41 +02:00
|
|
|
|
;; GCC 4.8+ requires a C++ compiler and library.
|
|
|
|
|
"--enable-languages=c,c++"
|
|
|
|
|
|
2014-06-14 15:34:56 +02:00
|
|
|
|
;; Make sure gcc-nm doesn't require liblto_plugin.so.
|
|
|
|
|
"--disable-lto"
|
|
|
|
|
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 23:21:59 +01:00
|
|
|
|
"--disable-shared"
|
|
|
|
|
"--disable-plugin"
|
|
|
|
|
"--disable-libmudflap"
|
2013-11-20 19:01:27 +01:00
|
|
|
|
"--disable-libatomic"
|
|
|
|
|
"--disable-libsanitizer"
|
|
|
|
|
"--disable-libitm"
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 23:21:59 +01:00
|
|
|
|
"--disable-libgomp"
|
2015-06-14 23:09:39 +02:00
|
|
|
|
"--disable-libcilkrts"
|
|
|
|
|
"--disable-libvtv"
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 23:21:59 +01:00
|
|
|
|
"--disable-libssp"
|
2015-06-09 00:14:03 +02:00
|
|
|
|
"--disable-libquadmath")
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 23:21:59 +01:00
|
|
|
|
(remove (cut string-match "--(.*plugin|enable-languages)" <>)
|
2015-01-02 04:53:55 +01:00
|
|
|
|
,flags)))
|
|
|
|
|
((#:phases phases)
|
2018-02-20 04:29:41 +01:00
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-after 'pre-configure 'remove-lgcc_s
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Remove the '-lgcc_s' added to GNU_USER_TARGET_LIB_SPEC in
|
|
|
|
|
;; the 'pre-configure phase of our main gcc package, because
|
|
|
|
|
;; that shared library is not present in this static gcc. See
|
|
|
|
|
;; <https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00008.html>.
|
|
|
|
|
(substitute* (cons "gcc/config/rs6000/sysv4.h"
|
|
|
|
|
(find-files "gcc/config"
|
|
|
|
|
"^gnu-user.*\\.h$"))
|
|
|
|
|
((" -lgcc_s}}") "}}"))
|
|
|
|
|
#t)))))))
|
2018-08-21 03:20:19 +02:00
|
|
|
|
(inputs
|
|
|
|
|
`(("zlib:static" ,zlib "static")
|
|
|
|
|
,@(package-inputs gcc)))
|
2013-11-23 16:07:29 +01:00
|
|
|
|
(native-inputs
|
|
|
|
|
(if (%current-target-system)
|
|
|
|
|
`(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
|
|
|
|
|
;; as target inputs and as native inputs; the latter is
|
|
|
|
|
;; needed when building build-time tools ('genconstants',
|
|
|
|
|
;; etc.) Failing to do that leads to misdetections of
|
|
|
|
|
;; declarations by 'gcc/configure', and eventually to
|
|
|
|
|
;; duplicate declarations as reported in
|
2017-03-30 00:48:16 +02:00
|
|
|
|
;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59217>.
|
2013-11-23 16:07:29 +01:00
|
|
|
|
("gmp-native" ,gmp)
|
|
|
|
|
("mpfr-native" ,mpfr)
|
|
|
|
|
("mpc-native" ,mpc)
|
2015-06-26 17:06:30 +02:00
|
|
|
|
,@(package-native-inputs gcc))
|
|
|
|
|
(package-native-inputs gcc))))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
(define %gcc-stripped
|
|
|
|
|
;; The subset of GCC files needed for bootstrap.
|
2015-06-26 17:06:30 +02:00
|
|
|
|
(package (inherit gcc)
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(name "gcc-stripped")
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(source #f)
|
2014-06-13 15:57:23 +02:00
|
|
|
|
(outputs '("out")) ;only one output
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (srfi srfi-1)
|
|
|
|
|
(srfi srfi-26)
|
|
|
|
|
(guix build utils))
|
|
|
|
|
|
|
|
|
|
(setvbuf (current-output-port) _IOLBF)
|
|
|
|
|
(let* ((out (assoc-ref %outputs "out"))
|
|
|
|
|
(bindir (string-append out "/bin"))
|
|
|
|
|
(libdir (string-append out "/lib"))
|
2013-11-02 15:17:08 +01:00
|
|
|
|
(includedir (string-append out "/include"))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(libexecdir (string-append out "/libexec"))
|
|
|
|
|
(gcc (assoc-ref %build-inputs "gcc")))
|
|
|
|
|
(copy-recursively (string-append gcc "/bin") bindir)
|
|
|
|
|
(for-each remove-store-references
|
|
|
|
|
(find-files bindir ".*"))
|
|
|
|
|
|
|
|
|
|
(copy-recursively (string-append gcc "/lib") libdir)
|
|
|
|
|
(for-each remove-store-references
|
|
|
|
|
(remove (cut string-suffix? ".h" <>)
|
|
|
|
|
(find-files libdir ".*")))
|
|
|
|
|
|
|
|
|
|
(copy-recursively (string-append gcc "/libexec")
|
|
|
|
|
libexecdir)
|
|
|
|
|
(for-each remove-store-references
|
|
|
|
|
(find-files libexecdir ".*"))
|
2013-11-02 15:17:08 +01:00
|
|
|
|
|
|
|
|
|
;; Starting from GCC 4.8, helper programs built natively
|
|
|
|
|
;; (‘genchecksum’, ‘gcc-nm’, etc.) rely on C++ headers.
|
|
|
|
|
(copy-recursively (string-append gcc "/include/c++")
|
|
|
|
|
(string-append includedir "/c++"))
|
2014-06-14 15:58:23 +02:00
|
|
|
|
|
|
|
|
|
;; For native builds, check whether the binaries actually work.
|
2018-03-16 11:31:22 +01:00
|
|
|
|
,@(if (%current-target-system)
|
|
|
|
|
'()
|
|
|
|
|
'((for-each (lambda (prog)
|
|
|
|
|
(invoke (string-append gcc "/bin/" prog)
|
|
|
|
|
"--version"))
|
|
|
|
|
'("gcc" "g++" "cpp"))))
|
|
|
|
|
|
|
|
|
|
#t))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(inputs `(("gcc" ,%gcc-static)))))
|
|
|
|
|
|
2019-07-22 10:07:07 +02:00
|
|
|
|
;; One package: build + remove store references
|
|
|
|
|
;; (define %mescc-tools-static-stripped
|
|
|
|
|
;; ;; A statically linked Mescc Tools with store references removed, for
|
|
|
|
|
;; ;; bootstrap.
|
|
|
|
|
;; (package
|
|
|
|
|
;; (inherit mescc-tools)
|
|
|
|
|
;; (name "mescc-tools-static-stripped")
|
|
|
|
|
;; (arguments
|
|
|
|
|
;; `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
|
|
|
|
;; "CC=gcc -static")
|
|
|
|
|
;; #:test-target "test"
|
|
|
|
|
;; #:phases (modify-phases %standard-phases
|
|
|
|
|
;; (delete 'configure)
|
|
|
|
|
;; (add-after 'install 'strip-store-references
|
|
|
|
|
;; (lambda _
|
|
|
|
|
;; (let* ((out (assoc-ref %outputs "out"))
|
|
|
|
|
;; (bin (string-append out "/bin")))
|
|
|
|
|
;; (for-each (lambda (file)
|
|
|
|
|
;; (let ((target (string-append bin "/" file)))
|
|
|
|
|
;; (format #t "strippingg `~a'...~%" target)
|
|
|
|
|
;; (remove-store-references target)))
|
|
|
|
|
;; '( "M1" "blood-elf" "hex2"))))))))))
|
|
|
|
|
|
|
|
|
|
;; Two packages: first build static, bare minimum content.
|
2018-11-16 19:29:55 +01:00
|
|
|
|
(define %mescc-tools-static
|
2019-07-22 10:07:07 +02:00
|
|
|
|
;; A statically linked MesCC Tools.
|
2018-11-16 19:29:55 +01:00
|
|
|
|
(package
|
|
|
|
|
(inherit mescc-tools)
|
|
|
|
|
(name "mescc-tools-static")
|
|
|
|
|
(arguments
|
2018-11-20 08:12:09 +01:00
|
|
|
|
`(#:system "i686-linux"
|
|
|
|
|
,@(substitute-keyword-arguments (package-arguments mescc-tools)
|
|
|
|
|
((#:make-flags flags)
|
|
|
|
|
`(cons "CC=gcc -static" ,flags)))))))
|
2018-11-16 19:29:55 +01:00
|
|
|
|
|
2019-07-22 10:07:07 +02:00
|
|
|
|
;; ... next remove store references.
|
|
|
|
|
(define %mescc-tools-static-stripped
|
|
|
|
|
;; A statically linked Mescc Tools with store references removed, for
|
|
|
|
|
;; bootstrap.
|
|
|
|
|
(package
|
|
|
|
|
(inherit %mescc-tools-static)
|
|
|
|
|
(name (string-append (package-name %mescc-tools-static) "-stripped"))
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
(let* ((in (assoc-ref %build-inputs "mescc-tools"))
|
|
|
|
|
(out (assoc-ref %outputs "out"))
|
|
|
|
|
(bin (string-append out "/bin")))
|
|
|
|
|
(mkdir-p bin)
|
|
|
|
|
(for-each (lambda (file)
|
|
|
|
|
(let ((target (string-append bin "/" file)))
|
|
|
|
|
(format #t "copying `~a'...~%" file)
|
|
|
|
|
(copy-file (string-append in "/bin/" file)
|
|
|
|
|
target)
|
|
|
|
|
(remove-store-references target)))
|
|
|
|
|
'( "M1" "blood-elf" "hex2"))
|
|
|
|
|
#t))))
|
|
|
|
|
(inputs `(("mescc-tools" ,%mescc-tools-static)))))
|
2019-07-22 10:07:41 +02:00
|
|
|
|
|
|
|
|
|
;; (define-public %mes-minimal-stripped
|
|
|
|
|
;; ;; A minimal Mes without documentation dependencies, for bootstrap.
|
|
|
|
|
;; (let ((triplet "i686-unknown-linux-gnu"))
|
|
|
|
|
;; (package
|
|
|
|
|
;; (inherit mes)
|
|
|
|
|
;; (name "mes-minimal-stripped")
|
|
|
|
|
;; (native-inputs
|
|
|
|
|
;; `(("guile" ,guile-2.2)))
|
|
|
|
|
;; (arguments
|
|
|
|
|
;; `(#:system "i686-linux"
|
|
|
|
|
;; #:strip-binaries? #f
|
|
|
|
|
;; #:configure-flags '("--mes")
|
|
|
|
|
;; #:phases
|
|
|
|
|
;; (modify-phases %standard-phases
|
|
|
|
|
;; (delete 'patch-shebangs)
|
|
|
|
|
;; (add-after 'install 'strip-install
|
|
|
|
|
;; (lambda _
|
|
|
|
|
;; (let* ((out (assoc-ref %outputs "out"))
|
|
|
|
|
;; (share (string-append out "/share")))
|
|
|
|
|
;; (delete-file-recursively (string-append out "/lib/guile"))
|
|
|
|
|
;; (delete-file-recursively (string-append share "/guile"))
|
|
|
|
|
;; (delete-file-recursively (string-append share "/mes/scaffold"))
|
|
|
|
|
|
|
|
|
|
;; (for-each delete-file
|
|
|
|
|
;; (find-files
|
|
|
|
|
;; (string-append share "/mes/lib") "\\.(h|c)"))
|
|
|
|
|
|
|
|
|
|
;; (for-each (lambda (dir)
|
|
|
|
|
;; (for-each remove-store-references
|
|
|
|
|
;; (find-files (string-append out "/" dir)
|
|
|
|
|
;; ".*")))
|
|
|
|
|
;; '("bin" "share/mes")))))))))))
|
|
|
|
|
|
|
|
|
|
;; Two packages: first build static, bare minimum content.
|
|
|
|
|
(define-public %mes-minimal
|
|
|
|
|
;; A minimal Mes without documentation.
|
2018-11-18 13:41:18 +01:00
|
|
|
|
(let ((triplet "i686-unknown-linux-gnu"))
|
|
|
|
|
(package
|
|
|
|
|
(inherit mes)
|
2019-07-22 10:07:41 +02:00
|
|
|
|
(name "mes-minimal")
|
2018-11-18 13:41:18 +01:00
|
|
|
|
(native-inputs
|
2018-11-20 08:12:09 +01:00
|
|
|
|
`(("guile" ,guile-2.2)))
|
2018-11-18 13:41:18 +01:00
|
|
|
|
(arguments
|
2018-11-20 08:12:09 +01:00
|
|
|
|
`(#:system "i686-linux"
|
|
|
|
|
#:strip-binaries? #f
|
2018-12-15 09:01:53 +01:00
|
|
|
|
#:configure-flags '("--mes")
|
2018-11-18 13:41:18 +01:00
|
|
|
|
#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
2019-07-22 10:07:41 +02:00
|
|
|
|
(delete 'patch-shebangs)
|
2018-12-15 09:01:53 +01:00
|
|
|
|
(add-after 'install 'strip-install
|
2018-11-18 13:41:18 +01:00
|
|
|
|
(lambda _
|
2018-12-15 09:01:53 +01:00
|
|
|
|
(let* ((out (assoc-ref %outputs "out"))
|
|
|
|
|
(share (string-append out "/share")))
|
|
|
|
|
(delete-file-recursively (string-append out "/lib/guile"))
|
|
|
|
|
(delete-file-recursively (string-append share "/guile"))
|
|
|
|
|
(delete-file-recursively (string-append share "/mes/scaffold"))
|
2019-07-22 10:07:41 +02:00
|
|
|
|
|
|
|
|
|
(for-each delete-file
|
|
|
|
|
(find-files
|
|
|
|
|
(string-append share "/mes/lib")
|
|
|
|
|
"\\.(h|c)")))))))))))
|
|
|
|
|
|
|
|
|
|
;; next remove store references.
|
|
|
|
|
(define %mes-minimal-stripped
|
|
|
|
|
;; A minimal Mes with store references removed, for bootstrap.
|
|
|
|
|
(package
|
|
|
|
|
(inherit %mes-minimal)
|
|
|
|
|
(name (string-append (package-name %mes-minimal) "-stripped"))
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
(let ((in (assoc-ref %build-inputs "mes"))
|
|
|
|
|
(out (assoc-ref %outputs "out")))
|
|
|
|
|
|
|
|
|
|
(copy-recursively in out)
|
|
|
|
|
(for-each (lambda (dir)
|
|
|
|
|
(for-each remove-store-references
|
|
|
|
|
(find-files (string-append out "/" dir)
|
|
|
|
|
".*")))
|
|
|
|
|
'("bin" "share/mes"))
|
|
|
|
|
#t))))
|
|
|
|
|
(inputs `(("mes" ,%mes-minimal)))))
|
2018-10-20 08:59:19 +02:00
|
|
|
|
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(define %guile-static
|
|
|
|
|
;; A statically-linked Guile that is relocatable--i.e., it can search
|
|
|
|
|
;; .scm and .go files relative to its installation directory, rather
|
|
|
|
|
;; than in hard-coded configure-time paths.
|
2013-10-15 23:42:58 +02:00
|
|
|
|
(let* ((patches (cons* (search-patch "guile-relocatable.patch")
|
2017-07-18 14:08:31 +02:00
|
|
|
|
(search-patch "guile-2.2-default-utf8.patch")
|
2013-10-15 23:42:58 +02:00
|
|
|
|
(search-patch "guile-linux-syscalls.patch")
|
2017-07-18 14:08:31 +02:00
|
|
|
|
(origin-patches (package-source guile-2.2))))
|
|
|
|
|
(source (origin (inherit (package-source guile-2.2))
|
2013-10-15 23:42:58 +02:00
|
|
|
|
(patches patches)))
|
2017-07-18 14:08:31 +02:00
|
|
|
|
(guile (package (inherit guile-2.2)
|
|
|
|
|
(name (string-append (package-name guile-2.2) "-static"))
|
2013-10-15 23:42:58 +02:00
|
|
|
|
(source source)
|
2013-08-21 11:44:16 +02:00
|
|
|
|
(synopsis "Statically-linked and relocatable Guile")
|
2013-11-03 22:35:17 +01:00
|
|
|
|
|
|
|
|
|
;; Remove the 'debug' output (see above for the reason.)
|
2017-07-18 14:08:31 +02:00
|
|
|
|
(outputs (delete "debug" (package-outputs guile-2.2)))
|
2013-11-03 22:35:17 +01:00
|
|
|
|
|
2018-08-21 03:20:19 +02:00
|
|
|
|
(inputs
|
|
|
|
|
`(("libunistring:static" ,libunistring "static")
|
|
|
|
|
,@(package-inputs guile-2.2)))
|
|
|
|
|
|
2013-06-25 23:39:14 +02:00
|
|
|
|
(propagated-inputs
|
|
|
|
|
`(("bdw-gc" ,libgc)
|
|
|
|
|
,@(alist-delete "bdw-gc"
|
2017-07-18 14:08:31 +02:00
|
|
|
|
(package-propagated-inputs guile-2.2))))
|
2013-06-25 23:39:14 +02:00
|
|
|
|
(arguments
|
2017-12-31 00:35:06 +01:00
|
|
|
|
(substitute-keyword-arguments (package-arguments guile-2.2)
|
|
|
|
|
((#:configure-flags flags '())
|
|
|
|
|
;; When `configure' checks for ltdl availability, it
|
|
|
|
|
;; doesn't try to link using libtool, and thus fails
|
|
|
|
|
;; because of a missing -ldl. Work around that.
|
|
|
|
|
''("LDFLAGS=-ldl"))
|
|
|
|
|
((#:phases phases '%standard-phases)
|
|
|
|
|
`(modify-phases ,phases
|
2018-02-28 16:43:59 +01:00
|
|
|
|
|
|
|
|
|
;; Do not record the absolute file name of 'sh' in
|
|
|
|
|
;; (ice-9 popen). This makes 'open-pipe' unusable in
|
|
|
|
|
;; a build chroot ('open-pipe*' is fine) but avoids
|
|
|
|
|
;; keeping a reference to Bash.
|
|
|
|
|
(delete 'pre-configure)
|
|
|
|
|
|
2017-12-31 00:35:06 +01:00
|
|
|
|
(add-before 'configure 'static-guile
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "libguile/Makefile.in"
|
|
|
|
|
;; Create a statically-linked `guile'
|
|
|
|
|
;; executable.
|
|
|
|
|
(("^guile_LDFLAGS =")
|
|
|
|
|
"guile_LDFLAGS = -all-static")
|
|
|
|
|
|
|
|
|
|
;; Add `-ldl' *after* libguile-2.2.la.
|
|
|
|
|
(("^guile_LDADD =(.*)$" _ ldadd)
|
|
|
|
|
(string-append "guile_LDADD = "
|
|
|
|
|
(string-trim-right ldadd)
|
|
|
|
|
" -ldl\n")))))))
|
|
|
|
|
((#:tests? _ #f)
|
|
|
|
|
;; There are uses of `dynamic-link' in
|
|
|
|
|
;; {foreign,coverage}.test that don't fly here.
|
2019-08-12 06:59:51 +02:00
|
|
|
|
#f)
|
|
|
|
|
((#:parallel-build? _ #f)
|
|
|
|
|
;; Work around the fact that the Guile build system is
|
|
|
|
|
;; not deterministic when parallel-build is enabled.
|
2017-12-31 00:35:06 +01:00
|
|
|
|
#f))))))
|
2013-06-14 15:29:08 +02:00
|
|
|
|
(package-with-relocatable-glibc (static-package guile))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
(define %guile-static-stripped
|
|
|
|
|
;; A stripped static Guile binary, for use during bootstrap.
|
|
|
|
|
(package (inherit %guile-static)
|
|
|
|
|
(name "guile-static-stripped")
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
2018-02-28 16:43:59 +01:00
|
|
|
|
;; The end result should depend on nothing but itself.
|
|
|
|
|
`(#:allowed-references ("out")
|
|
|
|
|
#:modules ((guix build utils))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
#:builder
|
|
|
|
|
(let ()
|
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
|
2013-08-21 11:38:51 +02:00
|
|
|
|
(let* ((in (assoc-ref %build-inputs "guile"))
|
|
|
|
|
(out (assoc-ref %outputs "out"))
|
|
|
|
|
(guile1 (string-append in "/bin/guile"))
|
|
|
|
|
(guile2 (string-append out "/bin/guile")))
|
2017-07-18 14:08:31 +02:00
|
|
|
|
(mkdir-p (string-append out "/share/guile/2.2"))
|
|
|
|
|
(copy-recursively (string-append in "/share/guile/2.2")
|
|
|
|
|
(string-append out "/share/guile/2.2"))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
2017-07-18 14:08:31 +02:00
|
|
|
|
(mkdir-p (string-append out "/lib/guile/2.2/ccache"))
|
|
|
|
|
(copy-recursively (string-append in "/lib/guile/2.2/ccache")
|
|
|
|
|
(string-append out "/lib/guile/2.2/ccache"))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
(mkdir (string-append out "/bin"))
|
2013-08-21 11:38:51 +02:00
|
|
|
|
(copy-file guile1 guile2)
|
|
|
|
|
|
2018-03-16 11:34:22 +01:00
|
|
|
|
;; Verify that the relocated Guile works.
|
|
|
|
|
,@(if (%current-target-system)
|
|
|
|
|
'()
|
|
|
|
|
'((invoke guile2 "--version")))
|
|
|
|
|
|
|
|
|
|
;; Strip store references.
|
|
|
|
|
(remove-store-references guile2)
|
|
|
|
|
|
|
|
|
|
;; Verify that the stripped Guile works. If it aborts, it could be
|
|
|
|
|
;; that it tries to open iconv descriptors and fails because libc's
|
|
|
|
|
;; iconv data isn't available (see `guile-default-utf8.patch'.)
|
|
|
|
|
,@(if (%current-target-system)
|
|
|
|
|
'()
|
|
|
|
|
'((invoke guile2 "--version")))
|
|
|
|
|
|
|
|
|
|
#t))))
|
2013-07-05 14:39:47 +02:00
|
|
|
|
(inputs `(("guile" ,%guile-static)))
|
2013-08-21 11:44:16 +02:00
|
|
|
|
(outputs '("out"))
|
|
|
|
|
(synopsis "Minimal statically-linked and relocatable Guile")))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
(define (tarball-package pkg)
|
|
|
|
|
"Return a package containing a tarball of PKG."
|
|
|
|
|
(package (inherit pkg)
|
|
|
|
|
(name (string-append (package-name pkg) "-tarball"))
|
|
|
|
|
(build-system trivial-build-system)
|
2013-06-25 23:39:14 +02:00
|
|
|
|
(native-inputs `(("tar" ,tar)
|
|
|
|
|
("xz" ,xz)))
|
|
|
|
|
(inputs `(("input" ,pkg)))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(arguments
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 23:21:59 +01:00
|
|
|
|
(let ((name (package-name pkg))
|
|
|
|
|
(version (package-version pkg)))
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
(let ((out (assoc-ref %outputs "out"))
|
|
|
|
|
(input (assoc-ref %build-inputs "input"))
|
|
|
|
|
(tar (assoc-ref %build-inputs "tar"))
|
|
|
|
|
(xz (assoc-ref %build-inputs "xz")))
|
|
|
|
|
(mkdir out)
|
|
|
|
|
(set-path-environment-variable "PATH" '("bin") (list tar xz))
|
|
|
|
|
(with-directory-excursion input
|
2018-03-16 11:36:21 +01:00
|
|
|
|
(invoke "tar" "cJvf"
|
|
|
|
|
(string-append out "/"
|
|
|
|
|
,name "-" ,version
|
|
|
|
|
"-"
|
|
|
|
|
,(or (%current-target-system)
|
|
|
|
|
(%current-system))
|
|
|
|
|
".tar.xz")
|
|
|
|
|
"."
|
|
|
|
|
;; avoid non-determinism in the archive
|
|
|
|
|
"--sort=name" "--mtime=@0"
|
|
|
|
|
"--owner=root:0" "--group=root:0")))))))))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
(define %bootstrap-binaries-tarball
|
|
|
|
|
;; A tarball with the statically-linked bootstrap binaries.
|
|
|
|
|
(tarball-package %static-binaries))
|
|
|
|
|
|
2018-09-09 11:49:04 +02:00
|
|
|
|
(define %linux-libre-headers-bootstrap-tarball
|
|
|
|
|
;; A tarball with the statically-linked Linux-Libre-Headers programs.
|
|
|
|
|
(tarball-package %linux-libre-headers-stripped))
|
|
|
|
|
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
(define %binutils-bootstrap-tarball
|
|
|
|
|
;; A tarball with the statically-linked Binutils programs.
|
|
|
|
|
(tarball-package %binutils-static-stripped))
|
|
|
|
|
|
2016-11-30 15:49:48 +01:00
|
|
|
|
(define (%glibc-bootstrap-tarball)
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
;; A tarball with GNU libc's shared libraries, dynamic linker, and headers.
|
2016-11-30 15:49:48 +01:00
|
|
|
|
(tarball-package (%glibc-stripped)))
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
|
|
|
|
|
(define %gcc-bootstrap-tarball
|
|
|
|
|
;; A tarball with a dynamic-linked GCC and its headers.
|
|
|
|
|
(tarball-package %gcc-stripped))
|
|
|
|
|
|
|
|
|
|
(define %guile-bootstrap-tarball
|
|
|
|
|
;; A tarball with the statically-linked, relocatable Guile.
|
|
|
|
|
(tarball-package %guile-static-stripped))
|
|
|
|
|
|
2018-11-16 19:29:55 +01:00
|
|
|
|
(define %mescc-tools-bootstrap-tarball
|
2019-07-22 10:07:07 +02:00
|
|
|
|
;; A tarball with statically-linked MesCC binary seed.
|
|
|
|
|
(tarball-package %mescc-tools-static-stripped))
|
2018-11-16 19:29:55 +01:00
|
|
|
|
|
2018-10-20 08:59:19 +02:00
|
|
|
|
(define %mes-bootstrap-tarball
|
2019-07-22 10:07:41 +02:00
|
|
|
|
;; A tarball with Mes binary seed.
|
2018-11-18 13:41:18 +01:00
|
|
|
|
(tarball-package %mes-minimal-stripped))
|
2018-10-20 08:59:19 +02:00
|
|
|
|
|
2013-01-05 15:46:08 +01:00
|
|
|
|
(define %bootstrap-tarballs
|
|
|
|
|
;; A single derivation containing all the bootstrap tarballs, for
|
|
|
|
|
;; convenience.
|
|
|
|
|
(package
|
|
|
|
|
(name "bootstrap-tarballs")
|
|
|
|
|
(version "0")
|
|
|
|
|
(source #f)
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(let ((out (assoc-ref %outputs "out")))
|
|
|
|
|
(use-modules (guix build utils)
|
|
|
|
|
(ice-9 match)
|
|
|
|
|
(srfi srfi-26))
|
|
|
|
|
|
|
|
|
|
(setvbuf (current-output-port) _IOLBF)
|
|
|
|
|
(mkdir out)
|
|
|
|
|
(chdir out)
|
|
|
|
|
(for-each (match-lambda
|
|
|
|
|
((name . directory)
|
|
|
|
|
(for-each (lambda (file)
|
|
|
|
|
(format #t "~a -> ~a~%" file out)
|
|
|
|
|
(symlink file (basename file)))
|
|
|
|
|
(find-files directory "\\.tar\\."))))
|
|
|
|
|
%build-inputs)
|
|
|
|
|
#t)))
|
|
|
|
|
(inputs `(("guile-tarball" ,%guile-bootstrap-tarball)
|
2019-06-21 09:39:07 +02:00
|
|
|
|
,@(match (or (%current-target-system) (%current-system))
|
2018-11-16 21:58:37 +01:00
|
|
|
|
((or "i686-linux" "x86_64-linux")
|
|
|
|
|
`(("bootstrap-mescc-tools" ,%mescc-tools-bootstrap-tarball)
|
|
|
|
|
("bootstrap-mes" ,%mes-bootstrap-tarball)
|
|
|
|
|
("bootstrap-linux-libre-headers"
|
|
|
|
|
,%linux-libre-headers-bootstrap-tarball)))
|
bootstrap: Replace GNU toolchain seeds with Mes for i686-linux.
* gnu/packages/bootstrap.scm (%bootstrap-inputs)[i686-linux]: Replace
%bootstrap-gcc, %bootstrap-binutils, %bootstrap-glibc with %mescc-tools-seed,
%mes-seed, %srfi-43 and %tinycc-seed.
* gnu/packages/make-bootstrap.scm (%bootstrap-tarballs)[i686-linux]: Replace
gcc-tarball, binutils-tarball, glibc-tarball with %mescc-tools-seed,
%mes-seed, %srfi-43 and %tinycc-seed.
* gnu/packages/commencement.scm (%bootstrap-inputs+toolchain)[i686-linux]: Add
glibc-mesboot, binutils-mesboot, gcc-wrapper, gcc-mesboot.
(file-boot0)[i686-linux]: Disable strip-binaries?, validate-runpath?.
(libstdc++-boot0)[i686-linux]: Add libtool install workarourd: copy
libstdc++.so.0.0.20 from gcc-mesboot.
(gcc-boot0)[i686-linux]: Add libtool install workaround: touch
libcc1.so.0.0.0, libcc1plugin.so.0.0.0.
(perl-boot0): Disable validate-runpath?.
(bison-boot0)[i686-linux]: Do not use ranlib -D.
2018-09-09 14:53:48 +02:00
|
|
|
|
(_ `(("gcc-tarball" ,%gcc-bootstrap-tarball)
|
|
|
|
|
("binutils-tarball" ,%binutils-bootstrap-tarball)
|
|
|
|
|
("glibc-tarball" ,(%glibc-bootstrap-tarball)))))
|
2013-01-05 15:46:08 +01:00
|
|
|
|
("coreutils&co-tarball" ,%bootstrap-binaries-tarball)))
|
2016-04-27 10:08:00 +02:00
|
|
|
|
(synopsis "Tarballs containing all the bootstrap binaries")
|
|
|
|
|
(description synopsis)
|
2013-01-05 15:46:08 +01:00
|
|
|
|
(home-page #f)
|
|
|
|
|
(license gpl3+)))
|
|
|
|
|
|
distro: Move bootstrap tarball packages to (distro packages make-bootstrap).
* distro/packages/base.scm (binutils-final): Make public.
(static-package, %bash-static, %static-inputs, %static-binaries,
%binutils-static, %binutils-static-stripped, %glibc-stripped,
%gcc-static, %gcc-stripped, %guile-static, %guile-static-stripped,
tarball-package, %bootstrap-binaries-tarball,
%binutils-bootstrap-tarball, %glibc-bootstrap-tarball,
%guile-bootstrap-tarball): Move to...
* distro/packages/make-bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2012-11-06 22:55:44 +01:00
|
|
|
|
;;; make-bootstrap.scm ends here
|