Mirror of GNU Guix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

424 lines
16 KiB

build-system: Introduce "bags" as an intermediate representation. * guix/build-system.scm (<build-system>)[build, cross-build]: Remove. [lower]: New field. (<bag>): New record type. (make-bag): New procedure. * guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs, bag-transitive-host-inputs, bag-transitive-target-inputs, package->bag): New procedures. (package-derivation): Use it; use the bag, apply its build procedure, etc. (package-cross-derivation): Likewise. * gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure. (%bootstrap-guile): Use them. * guix/build-system/trivial.scm (lower): New procedure. (trivial-build, trivial-cross-build): Remove 'source' parameter. Pass INPUTS as is. (trivial-build-system): Adjust accordingly. * guix/build-system/gnu.scm (%store, inputs-search-paths, standard-search-paths, expand-inputs, standard-inputs): Remove. (gnu-lower): New procedure. (gnu-build): Remove 'source' and #:implicit-inputs? parameters. Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get the source from INPUT-DRVS. (gnu-cross-build): Likewise. (standard-cross-packages): Remove call to 'standard-packages'. (standard-cross-inputs, standard-cross-search-paths): Remove. (gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'. * guix/build-system/cmake.scm (lower): New procedure. (cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and SEARCH-PATHS as is. Get the source from INPUTS. * guix/build-system/perl.scm: Likewise. * guix/build-system/python.scm: Likewise. * guix/build-system/ruby.scm: Likewise. * gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers" to "linux-headers". (cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f. Likewise. In 'propagated-inputs', change "cross-linux-headers" to "linux-headers". * guix/git-download.scm (git-fetch): Use 'standard-packages' instead of 'standard-inputs'. * tests/builders.scm ("gnu-build-system"): Remove use of 'build-system-builder'. ("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to 'gnu-build'. * tests/packages.scm ("search paths"): Adjust to new build system API. ("package-cross-derivation, no cross builder"): Likewise. * doc/guix.texi (Build Systems): Add paragraph on bags.
7 years ago
build-system: Introduce "bags" as an intermediate representation. * guix/build-system.scm (<build-system>)[build, cross-build]: Remove. [lower]: New field. (<bag>): New record type. (make-bag): New procedure. * guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs, bag-transitive-host-inputs, bag-transitive-target-inputs, package->bag): New procedures. (package-derivation): Use it; use the bag, apply its build procedure, etc. (package-cross-derivation): Likewise. * gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure. (%bootstrap-guile): Use them. * guix/build-system/trivial.scm (lower): New procedure. (trivial-build, trivial-cross-build): Remove 'source' parameter. Pass INPUTS as is. (trivial-build-system): Adjust accordingly. * guix/build-system/gnu.scm (%store, inputs-search-paths, standard-search-paths, expand-inputs, standard-inputs): Remove. (gnu-lower): New procedure. (gnu-build): Remove 'source' and #:implicit-inputs? parameters. Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get the source from INPUT-DRVS. (gnu-cross-build): Likewise. (standard-cross-packages): Remove call to 'standard-packages'. (standard-cross-inputs, standard-cross-search-paths): Remove. (gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'. * guix/build-system/cmake.scm (lower): New procedure. (cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and SEARCH-PATHS as is. Get the source from INPUTS. * guix/build-system/perl.scm: Likewise. * guix/build-system/python.scm: Likewise. * guix/build-system/ruby.scm: Likewise. * gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers" to "linux-headers". (cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f. Likewise. In 'propagated-inputs', change "cross-linux-headers" to "linux-headers". * guix/git-download.scm (git-fetch): Use 'standard-packages' instead of 'standard-inputs'. * tests/builders.scm ("gnu-build-system"): Remove use of 'build-system-builder'. ("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to 'gnu-build'. * tests/packages.scm ("search paths"): Adjust to new build system API. ("package-cross-derivation, no cross builder"): Likewise. * doc/guix.texi (Build Systems): Add paragraph on bags.
7 years ago
build-system: Introduce "bags" as an intermediate representation. * guix/build-system.scm (<build-system>)[build, cross-build]: Remove. [lower]: New field. (<bag>): New record type. (make-bag): New procedure. * guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs, bag-transitive-host-inputs, bag-transitive-target-inputs, package->bag): New procedures. (package-derivation): Use it; use the bag, apply its build procedure, etc. (package-cross-derivation): Likewise. * gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure. (%bootstrap-guile): Use them. * guix/build-system/trivial.scm (lower): New procedure. (trivial-build, trivial-cross-build): Remove 'source' parameter. Pass INPUTS as is. (trivial-build-system): Adjust accordingly. * guix/build-system/gnu.scm (%store, inputs-search-paths, standard-search-paths, expand-inputs, standard-inputs): Remove. (gnu-lower): New procedure. (gnu-build): Remove 'source' and #:implicit-inputs? parameters. Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get the source from INPUT-DRVS. (gnu-cross-build): Likewise. (standard-cross-packages): Remove call to 'standard-packages'. (standard-cross-inputs, standard-cross-search-paths): Remove. (gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'. * guix/build-system/cmake.scm (lower): New procedure. (cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and SEARCH-PATHS as is. Get the source from INPUTS. * guix/build-system/perl.scm: Likewise. * guix/build-system/python.scm: Likewise. * guix/build-system/ruby.scm: Likewise. * gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers" to "linux-headers". (cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f. Likewise. In 'propagated-inputs', change "cross-linux-headers" to "linux-headers". * guix/git-download.scm (git-fetch): Use 'standard-packages' instead of 'standard-inputs'. * tests/builders.scm ("gnu-build-system"): Remove use of 'build-system-builder'. ("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to 'gnu-build'. * tests/packages.scm ("search paths"): Adjust to new build system API. ("package-cross-derivation, no cross builder"): Likewise. * doc/guix.texi (Build Systems): Add paragraph on bags.
7 years ago
build-system: Introduce "bags" as an intermediate representation. * guix/build-system.scm (<build-system>)[build, cross-build]: Remove. [lower]: New field. (<bag>): New record type. (make-bag): New procedure. * guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs, bag-transitive-host-inputs, bag-transitive-target-inputs, package->bag): New procedures. (package-derivation): Use it; use the bag, apply its build procedure, etc. (package-cross-derivation): Likewise. * gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure. (%bootstrap-guile): Use them. * guix/build-system/trivial.scm (lower): New procedure. (trivial-build, trivial-cross-build): Remove 'source' parameter. Pass INPUTS as is. (trivial-build-system): Adjust accordingly. * guix/build-system/gnu.scm (%store, inputs-search-paths, standard-search-paths, expand-inputs, standard-inputs): Remove. (gnu-lower): New procedure. (gnu-build): Remove 'source' and #:implicit-inputs? parameters. Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get the source from INPUT-DRVS. (gnu-cross-build): Likewise. (standard-cross-packages): Remove call to 'standard-packages'. (standard-cross-inputs, standard-cross-search-paths): Remove. (gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'. * guix/build-system/cmake.scm (lower): New procedure. (cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and SEARCH-PATHS as is. Get the source from INPUTS. * guix/build-system/perl.scm: Likewise. * guix/build-system/python.scm: Likewise. * guix/build-system/ruby.scm: Likewise. * gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers" to "linux-headers". (cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f. Likewise. In 'propagated-inputs', change "cross-linux-headers" to "linux-headers". * guix/git-download.scm (git-fetch): Use 'standard-packages' instead of 'standard-inputs'. * tests/builders.scm ("gnu-build-system"): Remove use of 'build-system-builder'. ("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to 'gnu-build'. * tests/packages.scm ("search paths"): Adjust to new build system API. ("package-cross-derivation, no cross builder"): Likewise. * doc/guix.texi (Build Systems): Add paragraph on bags.
7 years ago
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages bootstrap)
  19. #:use-module (guix licenses)
  20. #:use-module (gnu packages)
  21. #:use-module (guix packages)
  22. #:use-module (guix download)
  23. #:use-module (guix build-system)
  24. #:use-module (guix build-system gnu)
  25. #:use-module (guix build-system trivial)
  26. #:use-module ((guix store) #:select (add-to-store add-text-to-store))
  27. #:use-module ((guix derivations) #:select (derivation))
  28. #:use-module (guix utils)
  29. #:use-module (srfi srfi-1)
  30. #:use-module (srfi srfi-26)
  31. #:use-module (ice-9 match)
  32. #:export (bootstrap-origin
  33. package-with-bootstrap-guile
  34. glibc-dynamic-linker
  35. %bootstrap-guile
  36. %bootstrap-coreutils&co
  37. %bootstrap-binutils
  38. %bootstrap-gcc
  39. %bootstrap-glibc
  40. %bootstrap-inputs))
  41. ;;; Commentary:
  42. ;;;
  43. ;;; Pre-built packages that are used to bootstrap the
  44. ;;; distribution--i.e., to build all the core packages from scratch.
  45. ;;;
  46. ;;; Code:
  47. ;;;
  48. ;;; Helper procedures.
  49. ;;;
  50. (define (bootstrap-origin source)
  51. "Return a variant of SOURCE, an <origin> instance, whose method uses
  52. %BOOTSTRAP-GUILE to do its job."
  53. (define (boot fetch)
  54. (lambda* (store url hash-algo hash
  55. #:optional name #:key system)
  56. (fetch store url hash-algo hash
  57. #:guile %bootstrap-guile
  58. #:system system)))
  59. (define %bootstrap-patch-inputs
  60. ;; Packages used when an <origin> has a non-empty 'patches' field.
  61. `(("tar" ,%bootstrap-coreutils&co)
  62. ("xz" ,%bootstrap-coreutils&co)
  63. ("bzip2" ,%bootstrap-coreutils&co)
  64. ("gzip" ,%bootstrap-coreutils&co)
  65. ("patch" ,%bootstrap-coreutils&co)))
  66. (let ((orig-method (origin-method source)))
  67. (origin (inherit source)
  68. (method (cond ((eq? orig-method url-fetch)
  69. (boot url-fetch))
  70. (else orig-method)))
  71. (patch-guile %bootstrap-guile)
  72. (patch-inputs %bootstrap-patch-inputs)
  73. ;; Patches can be origins as well, so process them.
  74. (patches (map (match-lambda
  75. ((? origin? patch)
  76. (bootstrap-origin patch))
  77. (patch patch))
  78. (origin-patches source))))))
  79. (define (package-from-tarball name source program-to-test description)
  80. "Return a package that correspond to the extraction of SOURCE.
  81. PROGRAM-TO-TEST is a program to run after extraction of SOURCE, to
  82. check whether everything is alright."
  83. (package
  84. (name name)
  85. (version "0")
  86. (build-system trivial-build-system)
  87. (arguments
  88. `(#:guile ,%bootstrap-guile
  89. #:modules ((guix build utils))
  90. #:builder
  91. (let ((out (assoc-ref %outputs "out"))
  92. (tar (assoc-ref %build-inputs "tar"))
  93. (xz (assoc-ref %build-inputs "xz"))
  94. (tarball (assoc-ref %build-inputs "tarball")))
  95. (use-modules (guix build utils))
  96. (mkdir out)
  97. (copy-file tarball "binaries.tar.xz")
  98. (system* xz "-d" "binaries.tar.xz")
  99. (let ((builddir (getcwd)))
  100. (with-directory-excursion out
  101. (and (zero? (system* tar "xvf"
  102. (string-append builddir "/binaries.tar")))
  103. (zero? (system* (string-append "bin/" ,program-to-test)
  104. "--version"))))))))
  105. (inputs
  106. `(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
  107. ("xz" ,(search-bootstrap-binary "xz" (%current-system)))
  108. ("tarball" ,(bootstrap-origin (source (%current-system))))))
  109. (source #f)
  110. (synopsis description)
  111. (description #f)
  112. (home-page #f)
  113. (license #f)))
  114. (define package-with-bootstrap-guile
  115. (memoize
  116. (lambda (p)
  117. "Return a variant of P such that all its origins are fetched with
  118. %BOOTSTRAP-GUILE."
  119. (define rewritten-input
  120. (match-lambda
  121. ((name (? origin? o))
  122. `(,name ,(bootstrap-origin o)))
  123. ((name (? package? p) sub-drvs ...)
  124. `(,name ,(package-with-bootstrap-guile p) ,@sub-drvs))
  125. (x x)))
  126. (package (inherit p)
  127. (source (match (package-source p)
  128. ((? origin? o) (bootstrap-origin o))
  129. (s s)))
  130. (inputs (map rewritten-input
  131. (package-inputs p)))
  132. (native-inputs (map rewritten-input
  133. (package-native-inputs p)))
  134. (propagated-inputs (map rewritten-input
  135. (package-propagated-inputs p)))))))
  136. (define* (glibc-dynamic-linker
  137. #:optional (system (or (and=> (%current-target-system)
  138. gnu-triplet->nix-system)
  139. (%current-system))))
  140. "Return the name of Glibc's dynamic linker for SYSTEM."
  141. (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
  142. ((string=? system "i686-linux") "/lib/ld-linux.so.2")
  143. ((string=? system "mips64el-linux") "/lib/ld.so.1")
  144. (else (error "dynamic linker name not known for this system"
  145. system))))
  146. ;;;
  147. ;;; Bootstrap packages.
  148. ;;;
  149. (define* (raw-build store name inputs
  150. #:key outputs system search-paths
  151. #:allow-other-keys)
  152. (define (->store file)
  153. (add-to-store store file #t "sha256"
  154. (or (search-bootstrap-binary file
  155. system)
  156. (error "bootstrap binary not found"
  157. file system))))
  158. (let* ((tar (->store "tar"))
  159. (xz (->store "xz"))
  160. (mkdir (->store "mkdir"))
  161. (bash (->store "bash"))
  162. (guile (->store "guile-2.0.9.tar.xz"))
  163. (builder
  164. (add-text-to-store store
  165. "build-bootstrap-guile.sh"
  166. (format #f "
  167. echo \"unpacking bootstrap Guile to '$out'...\"
  168. ~a $out
  169. cd $out
  170. ~a -dc < ~a | ~a xv
  171. # Sanity check.
  172. $out/bin/guile --version~%"
  173. mkdir xz guile tar)
  174. (list mkdir xz guile tar))))
  175. (derivation store name
  176. bash `(,builder)
  177. #:system system
  178. #:inputs `((,bash) (,builder)))))
  179. (define* (make-raw-bag name
  180. #:key source inputs native-inputs outputs
  181. system target)
  182. (bag
  183. (name name)
  184. (system system)
  185. (build-inputs inputs)
  186. (build raw-build)))
  187. (define %bootstrap-guile
  188. ;; The Guile used to run the build scripts of the initial derivations.
  189. ;; It is just unpacked from a tarball containing a pre-built binary.
  190. ;; This is typically built using %GUILE-BOOTSTRAP-TARBALL below.
  191. ;;
  192. ;; XXX: Would need libc's `libnss_files2.so' for proper `getaddrinfo'
  193. ;; support (for /etc/services).
  194. (let ((raw (build-system
  195. (name 'raw)
  196. (description "Raw build system with direct store access")
  197. (lower make-raw-bag))))
  198. (package
  199. (name "guile-bootstrap")
  200. (version "2.0")
  201. (source #f)
  202. (build-system raw)
  203. (synopsis "Bootstrap Guile")
  204. (description "Pre-built Guile for bootstrapping purposes.")
  205. (home-page #f)
  206. (license lgpl3+))))
  207. (define %bootstrap-base-urls
  208. ;; This is where the initial binaries come from.
  209. '("http://alpha.gnu.org/gnu/guix/bootstrap"
  210. "http://www.fdn.fr/~lcourtes/software/guix/packages"))
  211. (define %bootstrap-coreutils&co
  212. (package-from-tarball "bootstrap-binaries"
  213. (lambda (system)
  214. (origin
  215. (method url-fetch)
  216. (uri (map (cut string-append <> "/" system
  217. "/20131110/static-binaries.tar.xz")
  218. %bootstrap-base-urls))
  219. (sha256
  220. (match system
  221. ("x86_64-linux"
  222. (base32
  223. "0c533p9dhczzcsa1117gmfq3pc8w362g4mx84ik36srpr7cx2bg4"))
  224. ("i686-linux"
  225. (base32
  226. "0s5b3jb315n13m1k8095l0a5hfrsz8g0fv1b6riyc5hnxqyphlak"))
  227. ("mips64el-linux"
  228. (base32
  229. "072y4wyfsj1bs80r6vbybbafy8ya4vfy7qj25dklwk97m6g71753"))))))
  230. "true" ; the program to test
  231. "Bootstrap binaries of Coreutils, Awk, etc."))
  232. (define %bootstrap-binutils
  233. (package-from-tarball "binutils-bootstrap"
  234. (lambda (system)
  235. (origin
  236. (method url-fetch)
  237. (uri (map (cut string-append <> "/" system
  238. "/20131110/binutils-2.23.2.tar.xz")
  239. %bootstrap-base-urls))
  240. (sha256
  241. (match system
  242. ("x86_64-linux"
  243. (base32
  244. "1j5yivz7zkjqfsfmxzrrrffwyayjqyfxgpi89df0w4qziqs2dg20"))
  245. ("i686-linux"
  246. (base32
  247. "14jgwf9gscd7l2pnz610b1zia06dvcm2qyzvni31b8zpgmcai2v9"))
  248. ("mips64el-linux"
  249. (base32
  250. "1x8kkhcxmfyzg1ddpz2pxs6fbdl6412r7x0nzbmi5n7mj8zw2gy7"))))))
  251. "ld" ; the program to test
  252. "Bootstrap binaries of the GNU Binutils"))
  253. (define %bootstrap-glibc
  254. ;; The initial libc.
  255. (package
  256. (name "glibc-bootstrap")
  257. (version "0")
  258. (source #f)
  259. (build-system trivial-build-system)
  260. (arguments
  261. `(#:guile ,%bootstrap-guile
  262. #:modules ((guix build utils))
  263. #:builder
  264. (let ((out (assoc-ref %outputs "out"))
  265. (tar (assoc-ref %build-inputs "tar"))
  266. (xz (assoc-ref %build-inputs "xz"))
  267. (tarball (assoc-ref %build-inputs "tarball")))
  268. (use-modules (guix build utils))
  269. (mkdir out)
  270. (copy-file tarball "binaries.tar.xz")
  271. (system* xz "-d" "binaries.tar.xz")
  272. (let ((builddir (getcwd)))
  273. (with-directory-excursion out
  274. (system* tar "xvf"
  275. (string-append builddir
  276. "/binaries.tar"))
  277. (chmod "lib" #o755)
  278. ;; Patch libc.so so it refers to the right path.
  279. (substitute* "lib/libc.so"
  280. (("/[^ ]+/lib/(libc|ld)" _ prefix)
  281. (string-append out "/lib/" prefix))))))))
  282. (inputs
  283. `(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
  284. ("xz" ,(search-bootstrap-binary "xz" (%current-system)))
  285. ("tarball" ,(bootstrap-origin
  286. (origin
  287. (method url-fetch)
  288. (uri (map (cut string-append <> "/" (%current-system)
  289. "/20131110/glibc-2.18.tar.xz")
  290. %bootstrap-base-urls))
  291. (sha256
  292. (match (%current-system)
  293. ("x86_64-linux"
  294. (base32
  295. "0jlqrgavvnplj1b083s20jj9iddr4lzfvwybw5xrcis9spbfzk7v"))
  296. ("i686-linux"
  297. (base32
  298. "1hgrccw1zqdc7lvgivwa54d9l3zsim5pqm0dykxg0z522h6gr05w"))
  299. ("mips64el-linux"
  300. (base32
  301. "0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg")))))))))
  302. (synopsis "Bootstrap binaries and headers of the GNU C Library")
  303. (description #f)
  304. (home-page #f)
  305. (license lgpl2.1+)))
  306. (define %bootstrap-gcc
  307. ;; The initial GCC. Uses binaries from a tarball typically built by
  308. ;; %GCC-BOOTSTRAP-TARBALL.
  309. (package
  310. (name "gcc-bootstrap")
  311. (version "0")
  312. (source #f)
  313. (build-system trivial-build-system)
  314. (arguments
  315. `(#:guile ,%bootstrap-guile
  316. #:modules ((guix build utils))
  317. #:builder
  318. (let ((out (assoc-ref %outputs "out"))
  319. (tar (assoc-ref %build-inputs "tar"))
  320. (xz (assoc-ref %build-inputs "xz"))
  321. (bash (assoc-ref %build-inputs "bash"))
  322. (libc (assoc-ref %build-inputs "libc"))
  323. (tarball (assoc-ref %build-inputs "tarball")))
  324. (use-modules (guix build utils)
  325. (ice-9 popen))
  326. (mkdir out)
  327. (copy-file tarball "binaries.tar.xz")
  328. (system* xz "-d" "binaries.tar.xz")
  329. (let ((builddir (getcwd))
  330. (bindir (string-append out "/bin")))
  331. (with-directory-excursion out
  332. (system* tar "xvf"
  333. (string-append builddir "/binaries.tar")))
  334. (with-directory-excursion bindir
  335. (chmod "." #o755)
  336. (rename-file "gcc" ".gcc-wrapped")
  337. (call-with-output-file "gcc"
  338. (lambda (p)
  339. (format p "#!~a
  340. exec ~a/bin/.gcc-wrapped -B~a/lib \
  341. -Wl,-rpath -Wl,~a/lib \
  342. -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
  343. bash
  344. out libc libc libc
  345. ,(glibc-dynamic-linker))))
  346. (chmod "gcc" #o555))))))
  347. (inputs
  348. `(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
  349. ("xz" ,(search-bootstrap-binary "xz" (%current-system)))
  350. ("bash" ,(search-bootstrap-binary "bash" (%current-system)))
  351. ("libc" ,%bootstrap-glibc)
  352. ("tarball" ,(bootstrap-origin
  353. (origin
  354. (method url-fetch)
  355. (uri (map (cut string-append <> "/" (%current-system)
  356. "/20131110/gcc-4.8.2.tar.xz")
  357. %bootstrap-base-urls))
  358. (sha256
  359. (match (%current-system)
  360. ("x86_64-linux"
  361. (base32
  362. "17ga4m6195n4fnbzdkmik834znkhs53nkypp6557pl1ps7dgqbls"))
  363. ("i686-linux"
  364. (base32
  365. "150c1arrf2k8vfy6dpxh59vcgs4p1bgiz2av5m19dynpks7rjnyw"))
  366. ("mips64el-linux"
  367. (base32
  368. "1m5miqkyng45l745n0sfafdpjkqv9225xf44jqkygwsipj2cv9ks")))))))))
  369. (native-search-paths
  370. (list (search-path-specification
  371. (variable "CPATH")
  372. (directories '("include")))
  373. (search-path-specification
  374. (variable "LIBRARY_PATH")
  375. (directories '("lib" "lib64")))))
  376. (synopsis "Bootstrap binaries of the GNU Compiler Collection")
  377. (description #f)
  378. (home-page #f)
  379. (license gpl3+)))
  380. (define %bootstrap-inputs
  381. ;; The initial, pre-built inputs. From now on, we can start building our
  382. ;; own packages.
  383. `(("libc" ,%bootstrap-glibc)
  384. ("gcc" ,%bootstrap-gcc)
  385. ("binutils" ,%bootstrap-binutils)
  386. ("coreutils&co" ,%bootstrap-coreutils&co)
  387. ;; In gnu-build-system.scm, we rely on the availability of Bash.
  388. ("bash" ,%bootstrap-coreutils&co)))
  389. ;;; bootstrap.scm ends here