forked from tribes/guix
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 721c51ceb3 | |||
| 3c8170f65f | |||
| f927cc48e1 | |||
| 9d40ec0fcd | |||
| 83842db321 | |||
| cc625c9b1e | |||
| 7d21e9a8c4 | |||
| a524b98c67 | |||
| 062185b678 | |||
| 5e05e0f56f | |||
| 3b84bafcf7 | |||
| ebef32e07b | |||
| a49dd5b0ba | |||
| ab5334e4c6 | |||
| 8963701e2f | |||
| 6c65906c9a | |||
| ba4fb0c975 | |||
| 2c6136b6e3 | |||
| 579e3712b0 | |||
| ed906c84c7 | |||
| 4984e737b7 | |||
| 257ca91787 | |||
| f9293be58e | |||
| a7e7f29090 | |||
| 83ddbe0477 |
+3
-1
@@ -11,7 +11,7 @@
|
|||||||
# Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
|
# Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
|
||||||
# Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
|
# Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
|
||||||
# Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
|
# Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
|
||||||
# Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
# Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
# Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
# Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
|
# Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
|
||||||
# Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
# Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
@@ -1089,6 +1089,7 @@ dist_patch_DATA = \
|
|||||||
%D%/packages/patches/gcc-arm-link-spec-fix.patch \
|
%D%/packages/patches/gcc-arm-link-spec-fix.patch \
|
||||||
%D%/packages/patches/gcc-asan-missing-include.patch \
|
%D%/packages/patches/gcc-asan-missing-include.patch \
|
||||||
%D%/packages/patches/gcc-boot-2.95.3.patch \
|
%D%/packages/patches/gcc-boot-2.95.3.patch \
|
||||||
|
%D%/packages/patches/gcc-boot-2.95.3-arm.patch \
|
||||||
%D%/packages/patches/gcc-boot-4.6.4.patch \
|
%D%/packages/patches/gcc-boot-4.6.4.patch \
|
||||||
%D%/packages/patches/gcc-cross-environment-variables.patch \
|
%D%/packages/patches/gcc-cross-environment-variables.patch \
|
||||||
%D%/packages/patches/gcc-cross-gxx-include-dir.patch \
|
%D%/packages/patches/gcc-cross-gxx-include-dir.patch \
|
||||||
@@ -1157,6 +1158,7 @@ dist_patch_DATA = \
|
|||||||
%D%/packages/patches/glibc-allow-kernel-2.6.32.patch \
|
%D%/packages/patches/glibc-allow-kernel-2.6.32.patch \
|
||||||
%D%/packages/patches/glibc-boot-2.16.0.patch \
|
%D%/packages/patches/glibc-boot-2.16.0.patch \
|
||||||
%D%/packages/patches/glibc-boot-2.2.5.patch \
|
%D%/packages/patches/glibc-boot-2.2.5.patch \
|
||||||
|
%D%/packages/patches/glibc-bootstrap-arm-2.2.5.patch \
|
||||||
%D%/packages/patches/glibc-bootstrap-system-2.2.5.patch \
|
%D%/packages/patches/glibc-bootstrap-system-2.2.5.patch \
|
||||||
%D%/packages/patches/glibc-bootstrap-system-2.16.0.patch \
|
%D%/packages/patches/glibc-bootstrap-system-2.16.0.patch \
|
||||||
%D%/packages/patches/glibc-bootstrap-system.patch \
|
%D%/packages/patches/glibc-bootstrap-system.patch \
|
||||||
|
|||||||
+39
-12
@@ -661,12 +661,23 @@ $out/bin/guile --version~%"
|
|||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (map (cute string-append <>
|
(uri (map (cute string-append <>
|
||||||
|
(match system
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
(string-append
|
||||||
|
"/armhf-linux/20201219/"
|
||||||
|
"linux-libre-headers-stripped-5.4.20-armhf-linux.tar.xz"))
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
(string-append
|
||||||
"/i686-linux/20190815/"
|
"/i686-linux/20190815/"
|
||||||
"linux-libre-headers-stripped-4.14.67-i686-linux.tar.xz")
|
"linux-libre-headers-stripped-4.14.67-i686-linux.tar.xz"))))
|
||||||
%bootstrap-base-urls))
|
%bootstrap-base-urls))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0sm2z9x4wk45bh6qfs94p0w1d6hsy6dqx9sw38qsqbvxwa1qzk8s"))))
|
(match system
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"0d010sp3n2q6cc3ppcgrxrdlgkgr3vlv3x76wz14gc3xfhnnm2x5")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"0sm2z9x4wk45bh6qfs94p0w1d6hsy6dqx9sw38qsqbvxwa1qzk8s"))))))
|
||||||
#f ; no program to test
|
#f ; no program to test
|
||||||
"Bootstrap linux-libre-headers"))
|
"Bootstrap linux-libre-headers"))
|
||||||
|
|
||||||
@@ -968,17 +979,25 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
|
|||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (map
|
(uri (map
|
||||||
(cute string-append <>
|
(cut string-append <> (%current-system) "/"
|
||||||
"/i686-linux/20190815/"
|
(match (%current-system)
|
||||||
"mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz")
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"20221016/mescc-tools-static-stripped-1.4.0-armhf-linux.tar.xz")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"20190815/mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz")))
|
||||||
%bootstrap-base-urls))
|
%bootstrap-base-urls))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0c3kklgghzh4q2dbpl6asb74cimp7hp6jscdwqwmzxbapgcl6582")))))))
|
(match (%current-system)
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"0ldpxi17c6bgxi8sp84k0f49q0s4xn2nbg89qav594slhq3px9lv")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"0c3kklgghzh4q2dbpl6asb74cimp7hp6jscdwqwmzxbapgcl6582")))))))))
|
||||||
(synopsis "Bootstrap binaries of MesCC Tools")
|
(synopsis "Bootstrap binaries of MesCC Tools")
|
||||||
(description synopsis)
|
(description synopsis)
|
||||||
(home-page #f)
|
(home-page #f)
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(license gpl3+)))
|
(license gpl3+)))
|
||||||
|
|
||||||
(define %bootstrap-mes
|
(define %bootstrap-mes
|
||||||
@@ -1017,14 +1036,22 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
|
|||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (map
|
(uri (map
|
||||||
(cute string-append <>
|
(cute string-append <> (%current-system) "/"
|
||||||
"/i686-linux/20190815/"
|
(match (%current-system)
|
||||||
"mes-minimal-stripped-0.19-i686-linux.tar.xz")
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"20201217/mes-minimal-stripped-0.22-115-gdacaed9fe-armhf-linux.tar.xz")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"20190815/mes-minimal-stripped-0.19-i686-linux.tar.xz")))
|
||||||
%bootstrap-base-urls))
|
%bootstrap-base-urls))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1q4xjpx6nbn44kxnilpgl12bhpmwy2bblzwszc2ci7xkf400jcpv")))))))
|
(match (%current-system)
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"0daz658r9psmqxjkayvr8ymql6h4gf11gwdd4k3mdv7czc5ak399")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"1q4xjpx6nbn44kxnilpgl12bhpmwy2bblzwszc2ci7xkf400jcpv")))))))))
|
||||||
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(synopsis "Bootstrap binaries of Mes")
|
(synopsis "Bootstrap binaries of Mes")
|
||||||
(description synopsis)
|
(description synopsis)
|
||||||
(home-page #f)
|
(home-page #f)
|
||||||
|
|||||||
+258
-96
@@ -5,7 +5,7 @@
|
|||||||
;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2017, 2018, 2019, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2017, 2018, 2019, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2018, 2019, 2020, 2021, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
|
;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
|
||||||
;;; Copyright © 2020, 2022 Timothy Sample <samplet@ngyro.com>
|
;;; Copyright © 2020, 2022 Timothy Sample <samplet@ngyro.com>
|
||||||
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
|
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
|
||||||
@@ -157,6 +157,19 @@ pure Scheme to Tar and decompression in one easy step.")
|
|||||||
(replace 'configure
|
(replace 'configure
|
||||||
(bootstrap-configure "Gash" ,(package-version gash)
|
(bootstrap-configure "Gash" ,(package-version gash)
|
||||||
'("gash") "scripts"))
|
'("gash") "scripts"))
|
||||||
|
;; ARM's %bootstrap-guile (2.0.11) does not have EXIT_SUCCESS.
|
||||||
|
(add-after 'unpack 'patch-compat
|
||||||
|
(lambda* _
|
||||||
|
(substitute* "gash/compat.scm"
|
||||||
|
(("exact-integer") "avoid-exact-integer-override-in-2.0.11")
|
||||||
|
(("\\(if-guile-version-below \\(2 0 10\\)")
|
||||||
|
"(if-guile-version-below (2 0 10)
|
||||||
|
(begin
|
||||||
|
(define-public (exact-integer? x)
|
||||||
|
(and (integer? x) (exact? x)))))
|
||||||
|
|
||||||
|
(if-guile-version-below (2 0 12)
|
||||||
|
"))))
|
||||||
(replace 'build (bootstrap-build '("gash")))
|
(replace 'build (bootstrap-build '("gash")))
|
||||||
(replace 'install (bootstrap-install '("gash") "scripts"))
|
(replace 'install (bootstrap-install '("gash") "scripts"))
|
||||||
(add-after 'install 'install-symlinks
|
(add-after 'install 'install-symlinks
|
||||||
@@ -270,7 +283,6 @@ pure Scheme to Tar and decompression in one easy step.")
|
|||||||
(package
|
(package
|
||||||
(inherit mes)
|
(inherit mes)
|
||||||
(name "bootstrap-mes-rewired")
|
(name "bootstrap-mes-rewired")
|
||||||
(version "0.19")
|
|
||||||
(source #f)
|
(source #f)
|
||||||
(native-inputs `(("mes" ,%bootstrap-mes)
|
(native-inputs `(("mes" ,%bootstrap-mes)
|
||||||
("gash" ,gash-boot)))
|
("gash" ,gash-boot)))
|
||||||
@@ -278,6 +290,8 @@ pure Scheme to Tar and decompression in one easy step.")
|
|||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(outputs '("out"))
|
(outputs '("out"))
|
||||||
(build-system trivial-build-system)
|
(build-system trivial-build-system)
|
||||||
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:guile ,%bootstrap-guile
|
`(#:guile ,%bootstrap-guile
|
||||||
#:modules ((guix build utils))
|
#:modules ((guix build utils))
|
||||||
@@ -314,7 +328,9 @@ pure Scheme to Tar and decompression in one easy step.")
|
|||||||
;; Cannot easily rewire "mes" because it
|
;; Cannot easily rewire "mes" because it
|
||||||
;; contains NUL characters; would require
|
;; contains NUL characters; would require
|
||||||
;; remove-store-references alike trick
|
;; remove-store-references alike trick
|
||||||
(filter (negate (cut string-suffix? "/mes" <>))
|
(filter (negate (compose
|
||||||
|
(cute member <> '("mes" "mes-gcc"))
|
||||||
|
basename))
|
||||||
(find-files bin)))
|
(find-files bin)))
|
||||||
(rewire (string-append module "/mes/boot-0.scm"))
|
(rewire (string-append module "/mes/boot-0.scm"))
|
||||||
|
|
||||||
@@ -334,13 +350,17 @@ export MES MES_PREFIX
|
|||||||
|
|
||||||
MES_ARENA=${MES_REWIRED_ARENA-10000000}
|
MES_ARENA=${MES_REWIRED_ARENA-10000000}
|
||||||
MES_MAX_ARENA=${MES_REWIRED_ARENA-10000000}
|
MES_MAX_ARENA=${MES_REWIRED_ARENA-10000000}
|
||||||
MES_STACK=${MES_REWIRED_STACK-1000000}
|
MES_STACK=${MES_REWIRED_STACK-2000000}
|
||||||
export MES_ARENA MES_MAX_ARENA MES_STACK
|
export MES_ARENA MES_MAX_ARENA MES_STACK
|
||||||
|
|
||||||
$MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
$MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
||||||
"))))
|
"))))
|
||||||
(chmod mescc #o555)
|
(chmod mescc #o555)
|
||||||
|
|
||||||
|
(when (member ,(%current-system)
|
||||||
|
'("i686-linux" "x86_64-linux"))
|
||||||
|
;; The x86 bootstrap uses a %bootstrap-mes v0.19
|
||||||
|
;; which needs some additional fixups.
|
||||||
(with-directory-excursion module
|
(with-directory-excursion module
|
||||||
(chmod "mes/base.mes" #o644)
|
(chmod "mes/base.mes" #o644)
|
||||||
(copy-file "mes/base.mes" "mes/base.mes.orig")
|
(copy-file "mes/base.mes" "mes/base.mes.orig")
|
||||||
@@ -368,32 +388,35 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(let* ((self (car (command-line)))
|
(let* ((self (car (command-line)))
|
||||||
(prefix (dirname (dirname self))))
|
(prefix (dirname (dirname self))))
|
||||||
(set! %moduledir (string-append prefix \"/mes/module/\"))
|
(set! %moduledir (string-append prefix \"/mes/module/\"))
|
||||||
|
;; For MesCC-Tools v0.5.2
|
||||||
(setenv \"%numbered_arch\" \"true\"))
|
(setenv \"%numbered_arch\" \"true\"))
|
||||||
|
|
||||||
" guile.mes)
|
" guile.mes)
|
||||||
(close guile.mes)))
|
(close guile.mes))))
|
||||||
#t))))))
|
#t))))))
|
||||||
|
|
||||||
(define mes-boot
|
(define mes-boot
|
||||||
(package
|
(package
|
||||||
(inherit mes)
|
(inherit mes)
|
||||||
(name "mes-boot")
|
(name "mes-boot")
|
||||||
(version "0.22")
|
(version "0.23.1")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://gnu/mes/"
|
(uri (string-append "mirror://gnu/mes/"
|
||||||
"mes-" version ".tar.gz"))
|
"mes-" version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0p1jsrrmcbc0zrvbvnjbb6iyxr0in71km293q8qj6gnar6bw09av"))))
|
"0hbnqgjiajs8wq03dkvr9aswrzk8kl98dm6245xhlgqis8d2yhqd"))))
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("nyacc-source" ,(origin (inherit (package-source nyacc-0.99))
|
`(("nyacc-source" ,(origin (inherit (package-source nyacc-1.00.2))
|
||||||
(snippet #f)))
|
(snippet #f)))
|
||||||
("mes" ,%bootstrap-mes-rewired)
|
("mes" ,%bootstrap-mes-rewired)
|
||||||
("mescc-tools" ,%bootstrap-mescc-tools)
|
("mescc-tools" ,%bootstrap-mescc-tools)
|
||||||
,@(%boot-gash-inputs)))
|
,@(%boot-gash-inputs)))
|
||||||
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:implicit-inputs? #f
|
`(#:implicit-inputs? #f
|
||||||
#:tests? #f
|
#:tests? #f
|
||||||
@@ -418,10 +441,14 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(setenv "GUILE_LOAD_PATH"
|
(setenv "GUILE_LOAD_PATH"
|
||||||
(string-append
|
(string-append
|
||||||
mes "/share/mes/module"
|
mes "/share/mes/module"
|
||||||
":" dir "/nyacc-0.99.0/module"))
|
":" dir "/nyacc-1.00.2/module"))
|
||||||
(invoke "gash" "configure.sh"
|
(invoke "gash" "configure.sh"
|
||||||
(string-append "--prefix=" out)
|
(string-append "--prefix=" out)
|
||||||
(string-append "--host=i686-linux-gnu")))))
|
(string-append ,(match (%current-system)
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"--host=arm-linux")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"--host=i686-linux-gnu")))))))
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda _
|
(lambda _
|
||||||
(invoke "sh" "bootstrap.sh")))
|
(invoke "sh" "bootstrap.sh")))
|
||||||
@@ -458,9 +485,8 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(separator #f)
|
(separator #f)
|
||||||
(files '("")))))))
|
(files '("")))))))
|
||||||
|
|
||||||
|
|
||||||
(define tcc-boot0
|
(define tcc-boot0
|
||||||
;; Pristine tcc cannot be built by MesCC, we are keeping a delta of 11
|
;; Pristine tcc cannot be built by MesCC, we are keeping a delta of 30
|
||||||
;; patches. In a very early and rough form they were presented to the
|
;; patches. In a very early and rough form they were presented to the
|
||||||
;; TinyCC developers, who at the time showed no interest in supporting the
|
;; TinyCC developers, who at the time showed no interest in supporting the
|
||||||
;; bootstrappable effort; we will try again later. These patches have been
|
;; bootstrappable effort; we will try again later. These patches have been
|
||||||
@@ -469,23 +495,27 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(package
|
(package
|
||||||
(inherit tcc)
|
(inherit tcc)
|
||||||
(name "tcc-boot0")
|
(name "tcc-boot0")
|
||||||
(version "0.9.26-1103-g6e62e0e")
|
(version "0.9.26-1136-g1b4f281f")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (list
|
||||||
"http://lilypond.org/janneke/mes/20191117/"
|
(string-append "mirror://gnu/guix/mirror/"
|
||||||
"/tcc-" version ".tar.gz"))
|
"tcc-" version ".tar.gz")
|
||||||
|
(string-append "https://lilypond.org/janneke/tcc/"
|
||||||
|
"tcc-" version ".tar.gz")))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1qbybw7mxbgkv3sazvz1v7c8byq998vk8f1h25ik8w3d2l63lxng"))))
|
"0n8nb2yv1r9cxc00ryam16p0v5ix4jgwc73bdwjif9pdnr0yqmrh"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("mes" ,mes-boot)
|
`(("mes" ,mes-boot)
|
||||||
("nyacc-source" ,(origin (inherit (package-source nyacc-0.99))
|
("nyacc-source" ,(bootstrap-origin
|
||||||
(snippet #f)))
|
(origin (inherit (package-source nyacc-1.00.2))
|
||||||
|
(snippet #f))))
|
||||||
("mescc-tools" ,%bootstrap-mescc-tools)
|
("mescc-tools" ,%bootstrap-mescc-tools)
|
||||||
,@(%boot-gash-inputs)))
|
,@(%boot-gash-inputs)))
|
||||||
(arguments
|
(arguments
|
||||||
@@ -501,18 +531,17 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(with-directory-excursion ".."
|
(with-directory-excursion ".."
|
||||||
(invoke "tar" "-xvf" nyacc-source)))))
|
(invoke "tar" "-xvf" nyacc-source)))))
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref %outputs "out"))
|
(let* ((out (assoc-ref %outputs "out"))
|
||||||
(dir (with-directory-excursion ".." (getcwd)))
|
(dir (with-directory-excursion ".." (getcwd)))
|
||||||
(interpreter "/lib/mes-loader"))
|
(interpreter "/lib/mes-loader")
|
||||||
|
(mes (assoc-ref inputs "mes"))
|
||||||
(setenv "prefix" out)
|
(mescc (string-append mes "/bin/mescc")))
|
||||||
(setenv "GUILE_LOAD_PATH"
|
|
||||||
(string-append dir "/nyacc-0.99.0/module"))
|
|
||||||
|
|
||||||
(substitute* "conftest.c"
|
(substitute* "conftest.c"
|
||||||
(("volatile") ""))
|
(("volatile") ""))
|
||||||
|
(setenv "prefix" out)
|
||||||
|
(setenv "GUILE_LOAD_PATH"
|
||||||
|
(string-append dir "/nyacc-1.00.2/module"))
|
||||||
(invoke "sh" "configure"
|
(invoke "sh" "configure"
|
||||||
"--cc=mescc"
|
"--cc=mescc"
|
||||||
(string-append "--prefix=" out)
|
(string-append "--prefix=" out)
|
||||||
@@ -522,7 +551,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "bootstrap.sh" ; Show some progress
|
(substitute* "bootstrap.sh" ; Show some progress
|
||||||
(("^( *)((cp|ls|mkdir|rm|[.]/tcc|[.]/[$][{PROGRAM_PREFIX[}]tcc) [^\"]*[^\\])\n" all space cmd)
|
(("^( *)((cp|ls|mkdir|rm|[.]/tcc|[.]/[$][{program_prefix[}]tcc) [^\"]*[^\\])\n" all space cmd)
|
||||||
(string-append space "echo \"" cmd "\"\n"
|
(string-append space "echo \"" cmd "\"\n"
|
||||||
space cmd "\n")))
|
space cmd "\n")))
|
||||||
(invoke "sh" "bootstrap.sh")))
|
(invoke "sh" "bootstrap.sh")))
|
||||||
@@ -564,7 +593,8 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1rhgk2vvmdvnn6vygf0dja92ryyng00knl0kz5srb77k2kryjb2d"))))
|
"1rhgk2vvmdvnn6vygf0dja92ryyng00knl0kz5srb77k2kryjb2d"))))
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs `(("tcc" ,tcc-boot0)
|
(native-inputs `(("tcc" ,tcc-boot0)
|
||||||
@@ -607,6 +637,11 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
|
|
||||||
(define gnu-make-mesboot0
|
(define gnu-make-mesboot0
|
||||||
;; The initial make
|
;; The initial make
|
||||||
|
(let ((triplet (match (%current-system)
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"arm-linux")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"i686-linux-gnu"))))
|
||||||
(package
|
(package
|
||||||
(inherit gnu-make)
|
(inherit gnu-make)
|
||||||
(name "make-mesboot0")
|
(name "make-mesboot0")
|
||||||
@@ -617,7 +652,8 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1pb7fb7fqf9wz9najm85qdma1xhxzf1rhj5gwrlzdsz2zm0hpcv4"))))
|
"1pb7fb7fqf9wz9najm85qdma1xhxzf1rhj5gwrlzdsz2zm0hpcv4"))))
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs `(("tcc" ,tcc-boot0)
|
(native-inputs `(("tcc" ,tcc-boot0)
|
||||||
@@ -625,11 +661,11 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(arguments
|
(arguments
|
||||||
`(#:implicit-inputs? #f
|
`(#:implicit-inputs? #f
|
||||||
#:guile ,%bootstrap-guile
|
#:guile ,%bootstrap-guile
|
||||||
#:configure-flags '("CC=tcc"
|
#:configure-flags (list "CC=tcc"
|
||||||
"CPP=tcc -E"
|
"CPP=tcc -E"
|
||||||
"LD=tcc"
|
"LD=tcc"
|
||||||
"--build=i686-unknown-linux-gnu"
|
(string-append "--build=" ,triplet)
|
||||||
"--host=i686-unknown-linux-gnu"
|
(string-append "--host=" ,triplet)
|
||||||
"--disable-nls")
|
"--disable-nls")
|
||||||
#:modules ((guix build gnu-build-system)
|
#:modules ((guix build gnu-build-system)
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
@@ -656,7 +692,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(lambda _
|
(lambda _
|
||||||
(let* ((out (assoc-ref %outputs "out"))
|
(let* ((out (assoc-ref %outputs "out"))
|
||||||
(bin (string-append out "/bin")))
|
(bin (string-append out "/bin")))
|
||||||
(install-file "make" bin)))))))))
|
(install-file "make" bin))))))))))
|
||||||
|
|
||||||
(define (%boot-tcc0-inputs)
|
(define (%boot-tcc0-inputs)
|
||||||
`(("make" ,gnu-make-mesboot0)
|
`(("make" ,gnu-make-mesboot0)
|
||||||
@@ -673,7 +709,8 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs (%boot-tcc0-inputs))
|
(native-inputs `(("mes" ,mes-boot)
|
||||||
|
,@(%boot-tcc0-inputs)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:implicit-inputs? #f
|
`(#:implicit-inputs? #f
|
||||||
#:guile ,%bootstrap-guile
|
#:guile ,%bootstrap-guile
|
||||||
@@ -686,45 +723,81 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(substitute* "libtcc.c"
|
(substitute* "libtcc.c"
|
||||||
(("s->alacarte_link = 1;" all)
|
(("s->alacarte_link = 1;" all)
|
||||||
(string-append all "
|
(string-append all "
|
||||||
s->static_link = 1;")))))
|
s->static_link = 1;")))
|
||||||
|
(substitute* "tccelf.c"
|
||||||
|
(("tcc_add_support\\(s1, TCC_LIBTCC1\\);" all)
|
||||||
|
(string-append all "
|
||||||
|
#if CONFIG_TCC_LIBTCC1_MES
|
||||||
|
tcc_add_support(s1, TCC_LIBTCC1_MES);
|
||||||
|
#endif
|
||||||
|
")))
|
||||||
|
,@(match (%current-system)
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
'((substitute* "tccelf.c"
|
||||||
|
;; This fixes
|
||||||
|
;; "cannot execute binary file: Exec format error"
|
||||||
|
;; when building on aarch64-linux for ARM
|
||||||
|
(("#ifdef TCC_ARM_EABI")
|
||||||
|
"#if defined (TCC_ARM_EABI) || BOOTSTRAP"))))
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
'()))))
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref %outputs "out"))
|
(let* ((out (assoc-ref %outputs "out"))
|
||||||
(tcc (assoc-ref %build-inputs "tcc"))
|
(tcc (assoc-ref %build-inputs "tcc"))
|
||||||
(libc (assoc-ref %build-inputs "libc"))
|
(libc (assoc-ref %build-inputs "libc"))
|
||||||
(interpreter "/mes/loader"))
|
(interpreter "/mes/loader")
|
||||||
(invoke "sh" "configure"
|
(configure-flags
|
||||||
(string-append "--cc=tcc")
|
(list "--cc=tcc"
|
||||||
(string-append "--cpu=i386")
|
,@(match (%current-system)
|
||||||
|
((or "i686-linux" "x86_64-linux") '("--cpu=i386"))
|
||||||
|
((or "armhf-linux" "aarch64-linux") '("--cpu=arm")))
|
||||||
(string-append "--prefix=" out)
|
(string-append "--prefix=" out)
|
||||||
(string-append "--elfinterp=" interpreter)
|
(string-append "--elfinterp=" interpreter)
|
||||||
(string-append "--crtprefix=" tcc "/lib")
|
(string-append "--crtprefix=" tcc "/lib")
|
||||||
(string-append "--sysincludepaths=" tcc "/include")
|
(string-append "--sysincludepaths=" tcc "/include")
|
||||||
(string-append "--libpaths=" tcc "/lib")))))
|
(string-append "--libpaths=" tcc "/lib"))))
|
||||||
|
(format (current-error-port)
|
||||||
|
"running ./configure ~a\n" (string-join configure-flags))
|
||||||
|
(apply invoke "sh" "configure" configure-flags))))
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref %outputs "out"))
|
(let* ((out (assoc-ref %outputs "out"))
|
||||||
(tcc (assoc-ref %build-inputs "tcc"))
|
(tcc (assoc-ref %build-inputs "tcc"))
|
||||||
(libc (assoc-ref %build-inputs "libc"))
|
(libc (assoc-ref %build-inputs "libc"))
|
||||||
(interpreter "/mes/loader"))
|
(interpreter "/mes/loader")
|
||||||
(invoke
|
(cppflags
|
||||||
"tcc"
|
(list
|
||||||
"-vvv"
|
|
||||||
"-D" "BOOTSTRAP=1"
|
"-D" "BOOTSTRAP=1"
|
||||||
"-D" "ONE_SOURCE=1"
|
"-D" "ONE_SOURCE=1"
|
||||||
"-D" "TCC_TARGET_I386=1"
|
,@(match (%current-system)
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
'("-D" "TCC_TARGET_I386=1"))
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
'("-D" "TCC_TARGET_ARM=1"
|
||||||
|
"-D" "TCC_ARM_VFP=1"
|
||||||
|
"-D" "CONFIG_TCC_LIBTCC1_MES=1")))
|
||||||
|
"-D" "CONFIG_TCCBOOT=1"
|
||||||
"-D" "CONFIG_TCC_STATIC=1"
|
"-D" "CONFIG_TCC_STATIC=1"
|
||||||
"-D" "CONFIG_USE_LIBGCC=1"
|
"-D" "CONFIG_USE_LIBGCC=1"
|
||||||
"-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"")
|
"-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"")
|
||||||
"-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
|
"-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
|
||||||
"-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
|
|
||||||
"-D" (string-append "CONFIG_TCC_ELFINTERP=\"" interpreter "\"")
|
"-D" (string-append "CONFIG_TCC_ELFINTERP=\"" interpreter "\"")
|
||||||
"-D" (string-append "CONFIG_TCC_LIBPATHS=\"" tcc "/lib:{B}/lib:.\"")
|
"-D" (string-append "CONFIG_TCC_LIBPATHS=\"" tcc "/lib:{B}/lib:{B}/lib/tcc:.\"")
|
||||||
"-D" (string-append "CONFIG_TCC_SYSINCLUDEPATHS=\""
|
"-D" (string-append "CONFIG_TCC_SYSINCLUDEPATHS=\""
|
||||||
tcc "/include" ":/include:{B}/include\"")
|
tcc "/include" ":/include:{B}/include\"")
|
||||||
"-D" (string-append "TCC_LIBGCC=\"" tcc "/lib/libc.a\"")
|
"-D" (string-append "TCC_LIBGCC=\"" tcc "/lib/libc.a\"")
|
||||||
"-o" "tcc"
|
"-D" (string-append "TCC_LIBTCC1_MES=\"libtcc1-mes.a\"")))
|
||||||
"tcc.c"))))
|
(files ',(match (%current-system)
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
'("tcc.c"))
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
'("tcc.c" "lib/armflush.c"))))
|
||||||
|
(arguments (cons* "-vvv" "-g" "-o" "tcc"
|
||||||
|
(append cppflags files))))
|
||||||
|
(format (current-error-port)
|
||||||
|
"running tcc ~a\n" (string-join arguments))
|
||||||
|
(apply invoke "tcc" arguments))))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _
|
(lambda _
|
||||||
;; FIXME: add sensible check target (without depending on make)
|
;; FIXME: add sensible check target (without depending on make)
|
||||||
@@ -733,8 +806,16 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref %outputs "out"))
|
(let ((out (assoc-ref %outputs "out"))
|
||||||
(tcc (assoc-ref %build-inputs "tcc")))
|
(tcc (assoc-ref %build-inputs "tcc"))
|
||||||
(and
|
(mes (assoc-ref %build-inputs "mes"))
|
||||||
|
(cppflags '(,@(match (%current-system)
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
'("-D" "TCC_TARGET_ARM=1"
|
||||||
|
"-D" "TCC_ARM_VFP=1"))
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
'("-D" "TCC_TARGET_I386=1")))
|
||||||
|
"-D HAVE_FLOAT=1"
|
||||||
|
"-D HAVE_LONG_LONG=1")))
|
||||||
(mkdir-p (string-append out "/bin"))
|
(mkdir-p (string-append out "/bin"))
|
||||||
(copy-file "tcc" (string-append out "/bin/tcc"))
|
(copy-file "tcc" (string-append out "/bin/tcc"))
|
||||||
(mkdir-p (string-append out "/lib/tcc"))
|
(mkdir-p (string-append out "/lib/tcc"))
|
||||||
@@ -742,12 +823,38 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(string-append out "/include"))
|
(string-append out "/include"))
|
||||||
(copy-recursively (string-append tcc "/lib")
|
(copy-recursively (string-append tcc "/lib")
|
||||||
(string-append out "/lib"))
|
(string-append out "/lib"))
|
||||||
(invoke "tcc" "-D" "TCC_TARGET_I386=1" "-c" "-o" "libtcc1.o" "lib/libtcc1.c")
|
,@(match (%current-system)
|
||||||
(invoke "tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o")
|
((or "armhf-linux" "aarch64-linux")
|
||||||
(copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a"))
|
'((format (current-error-port) "compiling...\n")
|
||||||
|
(format (current-error-port) "cpp-flags=~s\n" cppflags)
|
||||||
|
|
||||||
(delete-file (string-append out "/lib/tcc/libtcc1.a"))
|
(delete-file (string-append out "/lib/tcc/libtcc1.a"))
|
||||||
(copy-file "libtcc1.a"
|
(apply invoke "./tcc" "-c" "-o" "libtcc1.o" "lib/libtcc1.c" cppflags)
|
||||||
(string-append out "/lib/tcc/libtcc1.a")))))))))))
|
(apply invoke "./tcc" "-c" "-o" "armeabi.o" "lib/armeabi.c" cppflags)
|
||||||
|
(invoke "./tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o" "armeabi.o")
|
||||||
|
(copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a"))
|
||||||
|
|
||||||
|
(delete-file (string-append out "/lib/tcc/libtcc1-mes.a"))
|
||||||
|
(apply invoke "./tcc" "-c" "-o" "libtcc1-mes.o"
|
||||||
|
(string-append mes "/lib/libtcc1.c") cppflags)
|
||||||
|
(invoke "./tcc" "-ar" "rc" "libtcc1-mes.a"
|
||||||
|
"libtcc1-mes.o" "armeabi.o")
|
||||||
|
(copy-file "libtcc1-mes.a"
|
||||||
|
(string-append out "/lib/tcc/libtcc1-mes.a"))
|
||||||
|
|
||||||
|
(delete-file (string-append out "/lib/libc.a"))
|
||||||
|
(apply invoke "./tcc" "-c" "-o" "libc.o"
|
||||||
|
"-I" (string-append tcc "/include")
|
||||||
|
"-I" (string-append tcc "/include/linux/arm")
|
||||||
|
(string-append mes "/lib/libc+gnu.c")
|
||||||
|
cppflags)
|
||||||
|
(invoke "./tcc" "-ar" "rc" "libc.a" "libc.o")
|
||||||
|
(copy-file "libc.a" (string-append out "/lib/libc.a"))))
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
'((delete-file (string-append out "/lib/tcc/libtcc1.a"))
|
||||||
|
(apply invoke "./tcc" "-c" "-o" "libtcc1.o" "lib/libtcc1.c" cppflags)
|
||||||
|
(invoke "./tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o")
|
||||||
|
(copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a")))))))))))))
|
||||||
|
|
||||||
(define patch-mesboot
|
(define patch-mesboot
|
||||||
;; The initial patch.
|
;; The initial patch.
|
||||||
@@ -762,7 +869,8 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"12nv7jx3gxfp50y11nxzlnmqqrpicjggw6pcsq0wyavkkm3cddgc"))))
|
"12nv7jx3gxfp50y11nxzlnmqqrpicjggw6pcsq0wyavkkm3cddgc"))))
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs (%boot-tcc0-inputs))
|
(native-inputs (%boot-tcc0-inputs))
|
||||||
@@ -792,6 +900,11 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
|
|
||||||
(define binutils-mesboot0
|
(define binutils-mesboot0
|
||||||
;; The initial Binutils
|
;; The initial Binutils
|
||||||
|
(let ((triplet (match (%current-system)
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"arm-unknown-linux-gnu")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"i386-unknown-linux-gnu"))))
|
||||||
(package
|
(package
|
||||||
(inherit binutils)
|
(inherit binutils)
|
||||||
(name "binutils-mesboot0")
|
(name "binutils-mesboot0")
|
||||||
@@ -801,23 +914,26 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://gnu/binutils/binutils-"
|
(uri (string-append "mirror://gnu/binutils/binutils-"
|
||||||
version ".tar.bz2"))
|
version ".tar.bz2"))
|
||||||
(patches (search-patches "binutils-boot-2.20.1a.patch"))
|
;; `patches' needs XZ
|
||||||
(patch-guile %bootstrap-guile)
|
;; (patches (search-patches "binutils-boot-2.20.1a.patch"))
|
||||||
|
;; (patch-guile %bootstrap-guile)
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi")))))
|
"0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi")))))
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs (%boot-tcc-inputs))
|
(native-inputs (%boot-tcc-inputs))
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:implicit-inputs? #f
|
(list
|
||||||
#:guile ,%bootstrap-guile
|
#:implicit-inputs? #f
|
||||||
|
#:guile %bootstrap-guile
|
||||||
#:tests? #f ; runtest: command not found
|
#:tests? #f ; runtest: command not found
|
||||||
#:parallel-build? #f
|
#:parallel-build? #f
|
||||||
#:strip-binaries? #f ; no strip yet
|
#:strip-binaries? #f ; no strip yet
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
(let ((cppflags (string-append " -D __GLIBC_MINOR__=6"
|
#~(let ((cppflags (string-append " -D __GLIBC_MINOR__=6"
|
||||||
" -D MES_BOOTSTRAP=1"))
|
" -D MES_BOOTSTRAP=1"))
|
||||||
(bash (assoc-ref %build-inputs "bash")))
|
(bash (assoc-ref %build-inputs "bash")))
|
||||||
`(,(string-append "CONFIG_SHELL=" bash "/bin/sh")
|
`(,(string-append "CONFIG_SHELL=" bash "/bin/sh")
|
||||||
@@ -829,9 +945,18 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
"--disable-nls"
|
"--disable-nls"
|
||||||
"--disable-shared"
|
"--disable-shared"
|
||||||
"--disable-werror"
|
"--disable-werror"
|
||||||
"--build=i686-unknown-linux-gnu"
|
,(string-append "--build=" #$triplet)
|
||||||
"--host=i686-unknown-linux-gnu"
|
,(string-append "--host=" #$triplet)
|
||||||
"--with-sysroot=/"))))))
|
;;(string-append "--target=" ,triplet)
|
||||||
|
"--with-sysroot=/"))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'apply-boot-patch
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((patch-file
|
||||||
|
#$(local-file
|
||||||
|
(search-patch "binutils-boot-2.20.1a.patch"))))
|
||||||
|
(invoke "patch" "--force" "-p1" "-i" patch-file))))))))))
|
||||||
|
|
||||||
(define gcc-core-mesboot0
|
(define gcc-core-mesboot0
|
||||||
;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C
|
;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C
|
||||||
@@ -839,6 +964,11 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
;; library, such as dir.h/struct DIR/readdir, locales, signals... Also,
|
;; library, such as dir.h/struct DIR/readdir, locales, signals... Also,
|
||||||
;; with gcc-2.95.3, binutils (2.14.0, 2.20.1a) and glibc-2.2.5 we found a
|
;; with gcc-2.95.3, binutils (2.14.0, 2.20.1a) and glibc-2.2.5 we found a
|
||||||
;; GNU toolchain triplet "that works".
|
;; GNU toolchain triplet "that works".
|
||||||
|
(let ((triplet (match (%current-system)
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"arm-unknown-linux-gnu")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"i686-unknown-linux-gnu"))))
|
||||||
(package
|
(package
|
||||||
(inherit gcc)
|
(inherit gcc)
|
||||||
(name "gcc-core-mesboot0")
|
(name "gcc-core-mesboot0")
|
||||||
@@ -853,7 +983,8 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
|
"1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs `(("binutils" ,binutils-mesboot0)
|
(native-inputs `(("binutils" ,binutils-mesboot0)
|
||||||
@@ -870,8 +1001,9 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
`("--enable-static"
|
`("--enable-static"
|
||||||
"--disable-shared"
|
"--disable-shared"
|
||||||
"--disable-werror"
|
"--disable-werror"
|
||||||
"--build=i686-unknown-linux-gnu"
|
,(string-append "--build=" #$triplet)
|
||||||
"--host=i686-unknown-linux-gnu"
|
,(string-append "--host=" #$triplet)
|
||||||
|
;; (string-append "--target=" #$triplet)
|
||||||
,(string-append "--prefix=" out)))
|
,(string-append "--prefix=" out)))
|
||||||
#:make-flags
|
#:make-flags
|
||||||
#~`("CC=tcc -static -D __GLIBC_MINOR__=6"
|
#~`("CC=tcc -static -D __GLIBC_MINOR__=6"
|
||||||
@@ -896,6 +1028,10 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(let ((patch-file
|
(let ((patch-file
|
||||||
#$(local-file
|
#$(local-file
|
||||||
(search-patch "gcc-boot-2.95.3.patch"))))
|
(search-patch "gcc-boot-2.95.3.patch"))))
|
||||||
|
(invoke "patch" "--force" "-p1" "-i" patch-file))
|
||||||
|
(let ((patch-file
|
||||||
|
#$(local-file
|
||||||
|
(search-patch "gcc-boot-2.95.3-arm.patch"))))
|
||||||
(invoke "patch" "--force" "-p1" "-i" patch-file))))
|
(invoke "patch" "--force" "-p1" "-i" patch-file))))
|
||||||
(add-before 'configure 'setenv
|
(add-before 'configure 'setenv
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
@@ -909,6 +1045,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
|
|||||||
(setenv "CC" (string-append "tcc" cppflags))
|
(setenv "CC" (string-append "tcc" cppflags))
|
||||||
(setenv "CC_FOR_BUILD" (string-append "tcc" cppflags))
|
(setenv "CC_FOR_BUILD" (string-append "tcc" cppflags))
|
||||||
(setenv "CPP" (string-append "tcc -E" cppflags))
|
(setenv "CPP" (string-append "tcc -E" cppflags))
|
||||||
|
(setenv "enable_threads" "single")
|
||||||
(with-output-to-file "config.cache"
|
(with-output-to-file "config.cache"
|
||||||
(lambda _
|
(lambda _
|
||||||
(display "
|
(display "
|
||||||
@@ -928,33 +1065,33 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
(add-after 'install 'install2
|
(add-after 'install 'install2
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((tcc (assoc-ref %build-inputs "tcc"))
|
(let* ((tcc (assoc-ref %build-inputs "tcc"))
|
||||||
(tcc-lib (string-append tcc "/lib/x86-mes-gcc"))
|
|
||||||
(out (assoc-ref outputs "out"))
|
(out (assoc-ref outputs "out"))
|
||||||
(gcc-dir (string-append
|
(gcc-dir (string-append
|
||||||
out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
|
out "/lib/gcc-lib/" #$triplet "/2.95.3")))
|
||||||
(mkdir-p "tmp")
|
(mkdir-p "tmp")
|
||||||
(with-directory-excursion "tmp"
|
(with-directory-excursion "tmp"
|
||||||
(invoke "ar" "x" (string-append "../gcc/libgcc2.a"))
|
(invoke "ar" "x" (string-append "../gcc/libgcc2.a"))
|
||||||
(invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
|
(invoke "ar" "x" (string-append tcc "/lib/tcc/libtcc1.a"))
|
||||||
(apply invoke "ar" "r" (string-append gcc-dir "/libgcc.a")
|
(copy-file "../gcc/libgcc.a" "libgcc.a")
|
||||||
(find-files "." "\\.o")))
|
(apply invoke "ar" "r" "libgcc.a" (find-files "." "\\.o"))
|
||||||
(copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))
|
(copy-file "libgcc.a" (string-append gcc-dir "/libgcc.a")))
|
||||||
(copy-file (string-append tcc "/lib/libtcc1.a")
|
(copy-file "gcc/libgcc2.a"
|
||||||
|
(string-append out "/lib/libgcc2.a"))
|
||||||
|
(copy-file (string-append tcc "/lib/tcc/libtcc1.a")
|
||||||
(string-append out "/lib/libtcc1.a"))
|
(string-append out "/lib/libtcc1.a"))
|
||||||
(invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
|
(invoke "ar" "x" (string-append tcc "/lib/tcc/libtcc1.a"))
|
||||||
(invoke "ar" "x" (string-append tcc "/lib/libc.a"))
|
(invoke "ar" "x" (string-append tcc "/lib/libc.a"))
|
||||||
(invoke "ar" "r" (string-append gcc-dir "/libc.a")
|
(invoke "ar" "r" (string-append gcc-dir "/libc.a")
|
||||||
"libc.o" "libtcc1.o")))))))
|
"libc.o" "libtcc1.o")))))))
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
(list (search-path-specification
|
(list (search-path-specification
|
||||||
(variable "C_INCLUDE_PATH")
|
(variable "C_INCLUDE_PATH")
|
||||||
(files '("include"
|
(files `("include"
|
||||||
|
|
||||||
;; Needed to get things like GCC's <stddef.h>.
|
;; Needed to get things like GCC's <stddef.h>.
|
||||||
"lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include")))
|
,(string-append "lib/gcc-lib/" triplet "/2.95.3/include"))))
|
||||||
(search-path-specification
|
(search-path-specification
|
||||||
(variable "LIBRARY_PATH")
|
(variable "LIBRARY_PATH")
|
||||||
(files '("lib")))))))
|
(files '("lib"))))))))
|
||||||
|
|
||||||
(define (%boot-mesboot-core-inputs)
|
(define (%boot-mesboot-core-inputs)
|
||||||
`(("binutils" ,binutils-mesboot0)
|
`(("binutils" ,binutils-mesboot0)
|
||||||
@@ -965,7 +1102,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
(package
|
(package
|
||||||
(inherit mes-boot)
|
(inherit mes-boot)
|
||||||
(name "mesboot-headers")
|
(name "mesboot-headers")
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs `(("kernel-headers" ,%bootstrap-linux-libre-headers)
|
(native-inputs `(("kernel-headers" ,%bootstrap-linux-libre-headers)
|
||||||
@@ -992,6 +1130,11 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
|
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
|
||||||
;; using gcc-2.95.3. Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer
|
;; using gcc-2.95.3. Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer
|
||||||
;; gcc.
|
;; gcc.
|
||||||
|
(let ((triplet (match (%current-system)
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"arm-unknown-linux-gnu")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"i686-unknown-linux-gnu"))))
|
||||||
(package
|
(package
|
||||||
(inherit glibc)
|
(inherit glibc)
|
||||||
(name "glibc-mesboot0")
|
(name "glibc-mesboot0")
|
||||||
@@ -1006,7 +1149,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
|
"1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
|
||||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs `(("headers" ,mesboot-headers)
|
(native-inputs `(("headers" ,mesboot-headers)
|
||||||
@@ -1026,18 +1170,19 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
#:configure-flags
|
#:configure-flags
|
||||||
#~(let ((out (assoc-ref %outputs "out"))
|
#~(let ((out (assoc-ref %outputs "out"))
|
||||||
(headers (assoc-ref %build-inputs "headers")))
|
(headers (assoc-ref %build-inputs "headers")))
|
||||||
`("--disable-shared"
|
(list
|
||||||
|
"--disable-shared"
|
||||||
"--enable-static"
|
"--enable-static"
|
||||||
"--disable-sanity-checks"
|
"--disable-sanity-checks"
|
||||||
"--build=i686-unknown-linux-gnu"
|
(string-append "--build=" #$triplet)
|
||||||
"--host=i686-unknown-linux-gnu"
|
(string-append "--host=" #$triplet)
|
||||||
,(string-append "--with-headers=" headers "/include")
|
(string-append "--with-headers=" headers "/include")
|
||||||
"--enable-static-nss"
|
"--enable-static-nss"
|
||||||
"--without-__thread"
|
"--without-__thread"
|
||||||
"--without-cvs"
|
"--without-cvs"
|
||||||
"--without-gd"
|
"--without-gd"
|
||||||
"--without-tls"
|
"--without-tls"
|
||||||
,(string-append "--prefix=" out)))
|
(string-append "--prefix=" out)))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'apply-boot-patch
|
(add-after 'unpack 'apply-boot-patch
|
||||||
@@ -1047,7 +1192,10 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
(search-patch "glibc-boot-2.2.5.patch")))
|
(search-patch "glibc-boot-2.2.5.patch")))
|
||||||
(invoke "patch" "--force" "-p1" "-i"
|
(invoke "patch" "--force" "-p1" "-i"
|
||||||
#$(local-file
|
#$(local-file
|
||||||
(search-patch "glibc-bootstrap-system-2.2.5.patch")))))
|
(search-patch "glibc-bootstrap-system-2.2.5.patch")))
|
||||||
|
(invoke "patch" "--force" "-p1" "-i"
|
||||||
|
#$(local-file
|
||||||
|
(search-patch "glibc-bootstrap-arm-2.2.5.patch")))))
|
||||||
(add-before 'configure 'setenv
|
(add-before 'configure 'setenv
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
@@ -1058,7 +1206,10 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
(cppflags (string-append
|
(cppflags (string-append
|
||||||
;;" -D __STDC__=1"
|
;;" -D __STDC__=1"
|
||||||
" -D MES_BOOTSTRAP=1"
|
" -D MES_BOOTSTRAP=1"
|
||||||
" -D BOOTSTRAP_GLIBC=1"))
|
" -D BOOTSTRAP_GLIBC=1"
|
||||||
|
(if (equal? #$triplet "arm-unknown-linux-gnu")
|
||||||
|
" -D __ARM_EABI__=1"
|
||||||
|
"")))
|
||||||
(cflags (string-append " -L " (getcwd))))
|
(cflags (string-append " -L " (getcwd))))
|
||||||
(setenv "CONFIG_SHELL" shell)
|
(setenv "CONFIG_SHELL" shell)
|
||||||
(setenv "SHELL" shell)
|
(setenv "SHELL" shell)
|
||||||
@@ -1080,7 +1231,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
(("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
|
(("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
|
||||||
(("BASH = ") (string-append
|
(("BASH = ") (string-append
|
||||||
"SHELL = " shell "
|
"SHELL = " shell "
|
||||||
BASH = ")))))))))))
|
BASH = "))))))))))))
|
||||||
|
|
||||||
(define gcc-mesboot0
|
(define gcc-mesboot0
|
||||||
(package
|
(package
|
||||||
@@ -1216,6 +1367,11 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
;; stricly needed, but very helpful for development because it builds
|
;; stricly needed, but very helpful for development because it builds
|
||||||
;; relatively fast. If this configures and builds then gcc-mesboot1 also
|
;; relatively fast. If this configures and builds then gcc-mesboot1 also
|
||||||
;; builds.
|
;; builds.
|
||||||
|
(let ((triplet (match (%current-system)
|
||||||
|
((or "armhf-linux" "aarch64-linux")
|
||||||
|
"arm-unknown-linux-gnu")
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
"i686-unknown-linux-gnu"))))
|
||||||
(package
|
(package
|
||||||
(inherit gcc-mesboot0)
|
(inherit gcc-mesboot0)
|
||||||
(name "gcc-core-mesboot1")
|
(name "gcc-core-mesboot1")
|
||||||
@@ -1227,6 +1383,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"173kdb188qg79pcz073cj9967rs2vzanyjdjyxy9v0xb0p5sad75"))))
|
"173kdb188qg79pcz073cj9967rs2vzanyjdjyxy9v0xb0p5sad75"))))
|
||||||
|
(supported-systems '("armhf-linux" "aarch64-linux"
|
||||||
|
"i686-linux" "x86_64-linux"))
|
||||||
(inputs `(("gmp-source" ,gmp-boot)
|
(inputs `(("gmp-source" ,gmp-boot)
|
||||||
("mpfr-source" ,mpfr-boot)
|
("mpfr-source" ,mpfr-boot)
|
||||||
("mpc-source" ,mpc-boot)))
|
("mpc-source" ,mpc-boot)))
|
||||||
@@ -1252,8 +1410,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
#~(let ((out (assoc-ref %outputs "out"))
|
#~(let ((out (assoc-ref %outputs "out"))
|
||||||
(glibc (assoc-ref %build-inputs "libc")))
|
(glibc (assoc-ref %build-inputs "libc")))
|
||||||
(list (string-append "--prefix=" out)
|
(list (string-append "--prefix=" out)
|
||||||
"--build=i686-unknown-linux-gnu"
|
(string-append "--build=" #$triplet)
|
||||||
"--host=i686-unknown-linux-gnu"
|
(string-append "--host=" #$triplet)
|
||||||
(string-append "--with-native-system-header-dir=" glibc "/include")
|
(string-append "--with-native-system-header-dir=" glibc "/include")
|
||||||
(string-append "--with-build-sysroot=" glibc "/include")
|
(string-append "--with-build-sysroot=" glibc "/include")
|
||||||
"--disable-bootstrap"
|
"--disable-bootstrap"
|
||||||
@@ -1285,6 +1443,10 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
(let ((patch-file
|
(let ((patch-file
|
||||||
#$(local-file
|
#$(local-file
|
||||||
(search-patch "gcc-boot-4.6.4.patch"))))
|
(search-patch "gcc-boot-4.6.4.patch"))))
|
||||||
|
(invoke "patch" "--force" "-p1" "-i" patch-file))
|
||||||
|
(let ((patch-file
|
||||||
|
#$(local-file
|
||||||
|
(search-patch "gcc-boot-2.95.3-arm.patch"))))
|
||||||
(invoke "patch" "--force" "-p1" "-i" patch-file))))
|
(invoke "patch" "--force" "-p1" "-i" patch-file))))
|
||||||
;; c&p from commencement.scm:gcc-boot0
|
;; c&p from commencement.scm:gcc-boot0
|
||||||
(add-after 'unpack 'unpack-gmp&co
|
(add-after 'unpack 'unpack-gmp&co
|
||||||
@@ -1331,7 +1493,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
|
|||||||
":" gcc "/lib"))
|
":" gcc "/lib"))
|
||||||
(format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
|
(format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
|
||||||
(format (current-error-port) "LIBRARY_PATH=~a\n"
|
(format (current-error-port) "LIBRARY_PATH=~a\n"
|
||||||
(getenv "LIBRARY_PATH"))))))))))
|
(getenv "LIBRARY_PATH")))))))))))
|
||||||
|
|
||||||
(define gcc-mesboot1
|
(define gcc-mesboot1
|
||||||
(package
|
(package
|
||||||
|
|||||||
@@ -598,10 +598,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
|
|||||||
(inherit mescc-tools)
|
(inherit mescc-tools)
|
||||||
(name "mescc-tools-static")
|
(name "mescc-tools-static")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:system "i686-linux"
|
`(#:system ,(match (%current-system)
|
||||||
|
((or "i686-linux" "x86_64-linux") "i686-linux")
|
||||||
|
((or "armhf-linux" "aarch64-linux") "armhf-linux"))
|
||||||
,@(substitute-keyword-arguments (package-arguments mescc-tools)
|
,@(substitute-keyword-arguments (package-arguments mescc-tools)
|
||||||
((#:make-flags flags)
|
((#:make-flags flags)
|
||||||
`(cons "CC=gcc -static" ,flags)))))))
|
'(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
||||||
|
"CC=gcc -static")))))))
|
||||||
|
|
||||||
;; ... next remove store references.
|
;; ... next remove store references.
|
||||||
(define %mescc-tools-static-stripped
|
(define %mescc-tools-static-stripped
|
||||||
@@ -636,7 +639,9 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
|
|||||||
(name "mes-minimal")
|
(name "mes-minimal")
|
||||||
(native-inputs (list guile-3.0))
|
(native-inputs (list guile-3.0))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:system "i686-linux"
|
`(#:system ,(match (%current-system)
|
||||||
|
((or "i686-linux" "x86_64-linux") "i686-linux")
|
||||||
|
((or "armhf-linux" "aarch64-linux") "armhf-linux"))
|
||||||
#:strip-binaries? #f
|
#:strip-binaries? #f
|
||||||
#:configure-flags '("--mes")
|
#:configure-flags '("--mes")
|
||||||
#:phases
|
#:phases
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2017, 2018, 2019, 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2017, 2018, 2019, 2020, 2021, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2020, 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2020, 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
|
||||||
@@ -167,14 +167,14 @@ parsers to allow execution with Guile as extension languages.")))
|
|||||||
(define-public mes
|
(define-public mes
|
||||||
(package
|
(package
|
||||||
(name "mes")
|
(name "mes")
|
||||||
(version "0.23")
|
(version "0.23.1")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://gnu/mes/"
|
(uri (string-append "mirror://gnu/mes/"
|
||||||
"mes-" version ".tar.gz"))
|
"mes-" version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0mnryfkl0dwbr5gxp16j5s95gw7z1vm1fqa1pxabp0aiar1hw53s"))))
|
"0hbnqgjiajs8wq03dkvr9aswrzk8kl98dm6245xhlgqis8d2yhqd"))))
|
||||||
(supported-systems '("armhf-linux" "i686-linux" "x86_64-linux"))
|
(supported-systems '("armhf-linux" "i686-linux" "x86_64-linux"))
|
||||||
(propagated-inputs (list mescc-tools nyacc-1.00.2))
|
(propagated-inputs (list mescc-tools nyacc-1.00.2))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
This patch enables building gcc-2.95.3 on armhf-linux using TCC and
|
||||||
|
Mes C Library.
|
||||||
|
|
||||||
|
* Add include/asm/unist.h linux header.
|
||||||
|
* Disable libgcc2.c float and long long functions.
|
||||||
|
|
||||||
|
Upstream status: Not presented upstream.
|
||||||
|
|
||||||
|
--- gcc-2.95.3/include/asm/unistd.h.orig 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ gcc-2.95.3/include/asm/unistd.h 2020-12-23 07:49:44.156673879 +0100
|
||||||
|
@@ -0,0 +1,9 @@
|
||||||
|
+#ifndef __ASM_UNISTD_H
|
||||||
|
+#define __ASM_UNISTD_H
|
||||||
|
+
|
||||||
|
+#if __arm__
|
||||||
|
+#define __NR_getpid 0x14
|
||||||
|
+#define __NR_kill 0x25
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#endif // __ASM_UNISTD_H
|
||||||
|
--- gcc-2.95.3/gcc/Makefile.in.orig 2020-12-23 08:31:57.733501802 +0100
|
||||||
|
+++ gcc-2.95.3/gcc/Makefile.in 2020-12-23 08:31:49.985371208 +0100
|
||||||
|
@@ -1260,7 +1260,7 @@
|
||||||
|
-(cd tmpcopy; chmod +w * > /dev/null 2>&1)
|
||||||
|
(cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC2))
|
||||||
|
(cd tmpcopy; $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) ../tmplibgcc.a *$(objext))
|
||||||
|
- rm -rf libgcc2.a tmpcopy
|
||||||
|
+ rm -rf tmpcopy
|
||||||
|
if $(RANLIB_TEST_FOR_TARGET) ; then \
|
||||||
|
$(RANLIB_FOR_TARGET) tmplibgcc.a; \
|
||||||
|
else true; fi
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user