Compare commits

...

25 Commits

Author SHA1 Message Date
Jan (janneke) Nieuwenhuizen
721c51ceb3 squash! gnu: commencement: gcc-mesboot0: Support ARM. 2022-10-19 10:37:17 +02:00
Jan (janneke) Nieuwenhuizen
3c8170f65f squash! gnu: commencement: gcc-core-mesboot0: Support ARM. 2022-10-19 10:37:16 +02:00
Jan (janneke) Nieuwenhuizen
f927cc48e1 squash! gnu: commencement: gcc-core-mesboot0: Support ARM. 2022-10-19 09:47:14 +02:00
Jan (janneke) Nieuwenhuizen
9d40ec0fcd squash! gnu: commencement: gcc-core-mesboot0: Support ARM. 2022-10-19 09:31:39 +02:00
Jan (janneke) Nieuwenhuizen
83842db321 DRAFT gnu: commencement: gcc-mesboot0: Support ARM.
* gnu/packages/commencement.scm (gcc-mesboot0)[native-inputs]: Add
gcc-boot-2.95.3-arm.patch.
[supported-systems]: Add armhf-linux, aarch64-linux.
[arguments]: Cater for armhf-linux, aarch64-linux.
2022-10-19 07:35:29 +02:00
Jan (janneke) Nieuwenhuizen
cc625c9b1e DRAFT gnu: commencement: glibc-mesboot0: Support ARM.
* __restrict_arr is probably symptom of preprocessor arithmetic problems
   + lsh, /
 * It looks like glibc-2.2.5 and mesboot-haeders mismatch.
   + Many __NR_* syscalls are missing
   + Some headers are missing.
 * gcc-mesboot0: illegal instruction in glibc-2.2.5:

   0x000276b4 <+28>:	ldr	r8, [r10]
   0x000276b8 <+32>:	svc	0x00000014
=> 0x000276bc <+36>:	mov	r4, r0

* gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/commencement.scm (glibc-mesboot0)[native-inputs]: Add it.
[arguments]: Apply it in apply-patches.  Cater for armhf-linux, aarch64-linux.
* gnu/packages/commencement.scm (glibc-mesboot0)
[supported-systems]: Add armhf-linux, aarch64-linux.
2022-10-19 07:35:29 +02:00
Jan (janneke) Nieuwenhuizen
7d21e9a8c4 gnu: commencement: mesboot-headers: Support ARM.
* gnu/packages/commencement.scm (mesboot-headers)[supported-systems]: Add
aarch64-linux, armhf-linux.
2022-10-19 07:35:29 +02:00
Jan (janneke) Nieuwenhuizen
a524b98c67 gnu: bootstrap: linux-libre-headers-bootstrap: Support ARM.
* gnu/packages/bootstrap.scm (%bootstrap-linux-libre-headers): Add tarball for
armhf-linux.
2022-10-19 07:35:29 +02:00
Jan (janneke) Nieuwenhuizen
062185b678 gnu: commencement: gcc-core-mesboot0: Support ARM.
* gnu/packages/patches/gcc-boot-2.95.3-arm.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/commencement.scm (gcc-core-mesboot0)[arguments]: Use it in
"apply-patches" stage, renamed from "apply-boot-patch".  Parameterize
configure-flags' --build,--host,--target.
[supported-systems]: Add aarch64-linux, armhf-linux.
2022-10-18 23:00:13 +02:00
Jan (janneke) Nieuwenhuizen
5e05e0f56f gnu: commencement: binutils-mesboot0: Support ARM.
* gnu/packages/commencement.scm (bash-mesboot0)[arguments]: Update to new
package style.  Parameterize configure-flags' --build,--host,--target.  Add
ac_cv_func_strncmp_works configure override.
[supported-systems]: Add aarch64-linux, armhf-linux.
2022-10-18 23:00:13 +02:00
Jan (janneke) Nieuwenhuizen
3b84bafcf7 gnu: commencement: patch-mesboot: Support ARM.
* gnu/packages/commencement.scm (patch-mesboot)[supported-systems]: Add
aarch64-linux, armhf-linux.
2022-10-18 23:00:13 +02:00
Jan (janneke) Nieuwenhuizen
ebef32e07b gnu: commencement: tcc-boot: Support ARM.
* gnu/packages/commencement.scm (tcc-boot)[arguments]: Cater for armhf-linux,
aarch64-linux.
[supported-systems]: Add aarch64-linux, armhf-linux.
2022-10-18 23:00:13 +02:00
Jan (janneke) Nieuwenhuizen
a49dd5b0ba gnu: commencement: make-mesboot0: Support ARM.
* gnu/packages/commencement.scm (gnu-make-mesboot0)[supported-systems]: Add
armhf-linux, aarch64-linux.
[arguments]: Cater for armhf-linux, aarch64-linux.
2022-10-18 23:00:13 +02:00
Jan (janneke) Nieuwenhuizen
ab5334e4c6 gnu: commencement: gzip-mesboot: Support ARM.
* gnu/packages/commencement.scm (gzip-mesboot)[supported-systems]: Add
armhf-linux, aarch64-linux.
2022-10-18 23:00:13 +02:00
Jan (janneke) Nieuwenhuizen
8963701e2f gnu: commencement: tcc-boot0: Update to tcc-0.9.26-1136-g1b4f281f.
* gnu/packages/commencement.scm (tcc-boot0)[source]: Use https source URL
with mirror://.  Update to tcc-0.9.26-1136-g1b4f281f.
[suported-systems]: Add armhf-linux, aarch64-linux.
[arguments]: Update accordingly.
2022-10-18 23:00:11 +02:00
Jan (janneke) Nieuwenhuizen
6c65906c9a gnu: commencement: tcc-boot0: Use nyacc-1.00.2.
* gnu/packages/commencement.scm (tcc-boot0): Update NYACC to 1.00.2 and call
'bootstrap-origin' on the source.
2022-10-18 22:59:58 +02:00
Jan (janneke) Nieuwenhuizen
ba4fb0c975 gnu: commencement: mes-boot: Support ARM, update to 0.23.1.
* gnu/packages/commencement.scm (mes-boot)[source]: Update to 0.23.1.
[native-inputs]: Upadate to nyacc-1.00.2.
[arguments]: Cater for armhf-linux, aarch64-linux.
[supported-systems]: Add arm-linux, aarch64-linux.
2022-10-18 22:59:58 +02:00
Jan (janneke) Nieuwenhuizen
2c6136b6e3 gnu: commencement: bootstrap-mes-rewired: Support ARM.
* gnu/packages/commencement.scm (%bootstrap-mes-rewired)[version]: Remove.
[arguments]: Use map fixup and numbered_arch override for x86 bootstrap only,
which bootstrap binary is fixed at mes-0.19.
[supported-systems]: Add armhf-linux, aarch64-linux.
2022-10-18 22:59:58 +02:00
Jan (janneke) Nieuwenhuizen
579e3712b0 gnu: commencement: gash-boot: Build fix for ARM.
* gnu/packages/commencement.scm (gash-boot)[arguments]: Add 'patch-compat
stage.
2022-10-18 22:59:58 +02:00
Jan (janneke) Nieuwenhuizen
ed906c84c7 DRAFT gnu: bootstrap: %bootstrap-mes: Support ARM.
XXX TODO:
  * rebase onto core-updates
  * release mes-0.23
  * rebuild

Built with
    7f847ea20b90c2fb8dc3b5eb51e6c007a8c5461a
    DRAFT bootstrap: mes-minimal: Support ARM, update to mes-0.22.115.

* gnu/packages/bootstrap.scm (%bootstrap-mes)[inputs]: Add tarball for
armhf-linux.
[supported-systems]: Add armhf-linux, aarch64-linux.
2022-10-18 22:59:58 +02:00
Jan (janneke) Nieuwenhuizen
4984e737b7 gnu: bootstrap: %bootstrap-mescc-tools: Update ARM to 1.4.0.
Built with
    1e41b0abb3d977301b5533588ee24803a5649a08
    gnu: bootstrap: mes-minimal: Support ARM, update for mes-0.23.1.

* gnu/packages/bootstrap.scm (%bootstrap-mes)
* gnu/packages/bootstrap.scm (%bootstrap-mescc-tools)[inputs]: Update ARM to
1.4.0.
2022-10-18 22:59:58 +02:00
Jan (janneke) Nieuwenhuizen
257ca91787 DRAFT gnu: bootstrap: %bootstrap-mescc-tools: Support ARM.
XXX TODO:
  * rebase onto core-updates
  * rebuild

Built with
    7f847ea20b90c2fb8dc3b5eb51e6c007a8c5461a
    DRAFT bootstrap: mes-minimal: Support ARM, update to mes-0.22.115.

* gnu/packages/bootstrap.scm (%bootstrap-mescc-tools)[inputs]: Add
tarball for armhf-linux.
[supported-systems]: Add armhf-linux, aarch64-linux.
2022-10-15 11:02:38 +02:00
Jan (janneke) Nieuwenhuizen
f9293be58e gnu: bootstrap: mes-minimal: Support ARM, update for mes-0.23.1.
* gnu/packages/make-bootstrap.scm (%mes-minimal): Update for mes-0.23.1.
[arguments]: Support armhf-linux, aarch64-linux.
2022-10-15 11:02:31 +02:00
Jan (janneke) Nieuwenhuizen
a7e7f29090 gnu: bootstrap: mescc-tools: Support ARM.
* gnu/packages/make-bootstrap.scm[arguments]: Support armhf-linux,
aarch64-linux.  Update make-flags to really build static.
2022-10-15 11:02:30 +02:00
Jan (janneke) Nieuwenhuizen
83ddbe0477 gnu: mes: Update to 0.23.1.
* gnu/packages/mes.scm (mes): Update to 0.23.1.
2022-10-15 11:02:30 +02:00
7 changed files with 1922 additions and 408 deletions

View File

@@ -11,7 +11,7 @@
# Copyright © 2016 Ben Woodcroft <donttrustben@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 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 Clément Lassieur <clement@lassieur.org>
# 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-asan-missing-include.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-cross-environment-variables.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-boot-2.16.0.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.16.0.patch \
%D%/packages/patches/glibc-bootstrap-system.patch \

View File

@@ -661,12 +661,23 @@ $out/bin/guile --version~%"
(origin
(method url-fetch)
(uri (map (cute string-append <>
"/i686-linux/20190815/"
"linux-libre-headers-stripped-4.14.67-i686-linux.tar.xz")
(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/"
"linux-libre-headers-stripped-4.14.67-i686-linux.tar.xz"))))
%bootstrap-base-urls))
(sha256
(base32
"0sm2z9x4wk45bh6qfs94p0w1d6hsy6dqx9sw38qsqbvxwa1qzk8s"))))
(match system
((or "armhf-linux" "aarch64-linux")
"0d010sp3n2q6cc3ppcgrxrdlgkgr3vlv3x76wz14gc3xfhnnm2x5")
((or "i686-linux" "x86_64-linux")
"0sm2z9x4wk45bh6qfs94p0w1d6hsy6dqx9sw38qsqbvxwa1qzk8s"))))))
#f ; no program to test
"Bootstrap linux-libre-headers"))
@@ -968,17 +979,25 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
(origin
(method url-fetch)
(uri (map
(cute string-append <>
"/i686-linux/20190815/"
"mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz")
(cut string-append <> (%current-system) "/"
(match (%current-system)
((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))
(sha256
(base32
"0c3kklgghzh4q2dbpl6asb74cimp7hp6jscdwqwmzxbapgcl6582")))))))
(match (%current-system)
((or "armhf-linux" "aarch64-linux")
"0ldpxi17c6bgxi8sp84k0f49q0s4xn2nbg89qav594slhq3px9lv")
((or "i686-linux" "x86_64-linux")
"0c3kklgghzh4q2dbpl6asb74cimp7hp6jscdwqwmzxbapgcl6582")))))))))
(synopsis "Bootstrap binaries of MesCC Tools")
(description synopsis)
(home-page #f)
(supported-systems '("i686-linux" "x86_64-linux"))
(supported-systems '("armhf-linux" "aarch64-linux"
"i686-linux" "x86_64-linux"))
(license gpl3+)))
(define %bootstrap-mes
@@ -1017,14 +1036,22 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
(origin
(method url-fetch)
(uri (map
(cute string-append <>
"/i686-linux/20190815/"
"mes-minimal-stripped-0.19-i686-linux.tar.xz")
(cute string-append <> (%current-system) "/"
(match (%current-system)
((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))
(sha256
(base32
"1q4xjpx6nbn44kxnilpgl12bhpmwy2bblzwszc2ci7xkf400jcpv")))))))
(supported-systems '("i686-linux" "x86_64-linux"))
(match (%current-system)
((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")
(description synopsis)
(home-page #f)

File diff suppressed because it is too large Load Diff

View File

@@ -598,10 +598,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(inherit mescc-tools)
(name "mescc-tools-static")
(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)
((#:make-flags flags)
`(cons "CC=gcc -static" ,flags)))))))
'(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
"CC=gcc -static")))))))
;; ... next remove store references.
(define %mescc-tools-static-stripped
@@ -636,7 +639,9 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(name "mes-minimal")
(native-inputs (list guile-3.0))
(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
#:configure-flags '("--mes")
#:phases

View File

@@ -1,5 +1,5 @@
;;; 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 © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; 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
(package
(name "mes")
(version "0.23")
(version "0.23.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/mes/"
"mes-" version ".tar.gz"))
(sha256
(base32
"0mnryfkl0dwbr5gxp16j5s95gw7z1vm1fqa1pxabp0aiar1hw53s"))))
"0hbnqgjiajs8wq03dkvr9aswrzk8kl98dm6245xhlgqis8d2yhqd"))))
(supported-systems '("armhf-linux" "i686-linux" "x86_64-linux"))
(propagated-inputs (list mescc-tools nyacc-1.00.2))
(native-inputs

View File

@@ -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