diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2026-02-16 10:22:51 +0200 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2026-02-16 10:22:51 +0200 |
| commit | 85c7c4e3cacc25f8d1a4183ffe24664be96afe3f (patch) | |
| tree | a009be41b00fb3c0a7644b8a4996fdb9f0a82566 | |
| parent | 7402a65742695752e0e9504e472566a9d4c7bc4a (diff) | |
WIP: use musl path to build hello-mesboot
Change-Id: I1588fadc238bb3b506c589d1c96f5cd5a2bee0df
| -rw-r--r-- | gnu/packages/commencement.scm | 69 |
1 files changed, 40 insertions, 29 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 6d1b4a88b69..e366896c2fa 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm | |||
| @@ -1648,9 +1648,10 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1648 | (uri (string-append "mirror://gnu/m4/m4-" version ".tar.gz")) | 1648 | (uri (string-append "mirror://gnu/m4/m4-" version ".tar.gz")) |
| 1649 | (sha256 | 1649 | (sha256 |
| 1650 | (base32 "1arz972zxmwhnyik9007g6ww9gars8d55xbvg548xlsw3a9369mb")))) | 1650 | (base32 "1arz972zxmwhnyik9007g6ww9gars8d55xbvg548xlsw3a9369mb")))) |
| 1651 | (native-inputs (if (target-x86?) | 1651 | (native-inputs #;(if (target-x86?) |
| 1652 | (%boot-mesboot1-inputs) | 1652 | (%boot-mesboot1-inputs) |
| 1653 | (%boot-tcc-musl-inputs))) | 1653 | (%boot-tcc-musl-inputs)) |
| 1654 | (%boot-tcc-musl-inputs)) | ||
| 1654 | (inputs '()) | 1655 | (inputs '()) |
| 1655 | (propagated-inputs '()) | 1656 | (propagated-inputs '()) |
| 1656 | (arguments | 1657 | (arguments |
| @@ -1658,11 +1659,12 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1658 | #:tests? #f | 1659 | #:tests? #f |
| 1659 | #:guile %bootstrap-guile | 1660 | #:guile %bootstrap-guile |
| 1660 | #:implicit-inputs? #f | 1661 | #:implicit-inputs? #f |
| 1661 | #:parallel-build? (target-x86?) | 1662 | #:parallel-build? #f#;(target-x86?) |
| 1662 | #:configure-flags | 1663 | #:configure-flags |
| 1663 | #~(list #$@(if (target-x86?) | 1664 | #~(list ;#$@(if (target-x86?) |
| 1664 | #~() | 1665 | ; #~() |
| 1665 | #~("CC=tcc")) | 1666 | ; #~("CC=tcc")) |
| 1667 | "CC=tcc" | ||
| 1666 | (string-append "--build=" #$(commencement-build-target)) | 1668 | (string-append "--build=" #$(commencement-build-target)) |
| 1667 | (string-append "--host=" #$(commencement-build-target))))))) | 1669 | (string-append "--host=" #$(commencement-build-target))))))) |
| 1668 | 1670 | ||
| @@ -1677,9 +1679,10 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1677 | (uri (string-append "mirror://gnu/gmp/gmp-" version ".tar.gz")) | 1679 | (uri (string-append "mirror://gnu/gmp/gmp-" version ".tar.gz")) |
| 1678 | (sha256 | 1680 | (sha256 |
| 1679 | (base32 "09w5yzlvdll19fa9zhh0f4y97hv8483cbly0003zvbvyighpzwvi")))) | 1681 | (base32 "09w5yzlvdll19fa9zhh0f4y97hv8483cbly0003zvbvyighpzwvi")))) |
| 1680 | (native-inputs (if (target-x86?) | 1682 | (native-inputs #;(if (target-x86?) |
| 1681 | (%boot-mesboot1-inputs) | 1683 | (%boot-mesboot1-inputs) |
| 1682 | (%boot-tcc-musl-inputs))) | 1684 | (%boot-tcc-musl-inputs)) |
| 1685 | (%boot-tcc-musl-inputs)) | ||
| 1683 | (inputs (list m4-boot)) | 1686 | (inputs (list m4-boot)) |
| 1684 | (propagated-inputs '()) | 1687 | (propagated-inputs '()) |
| 1685 | (arguments | 1688 | (arguments |
| @@ -1689,9 +1692,11 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1689 | #:implicit-inputs? #f | 1692 | #:implicit-inputs? #f |
| 1690 | #:parallel-build? #f | 1693 | #:parallel-build? #f |
| 1691 | #:configure-flags | 1694 | #:configure-flags |
| 1692 | #~(list #$@(if (target-x86?) | 1695 | #~(list ;#$@(if (target-x86?) |
| 1693 | #~() | 1696 | ; #~() |
| 1694 | #~("CC=tcc")) | 1697 | ; #~("CC=tcc")) |
| 1698 | "CC=tcc" | ||
| 1699 | "CFLAGS=-D HAVE_ALLOCA_H" | ||
| 1695 | (string-append "--build=" #$(commencement-build-target)) | 1700 | (string-append "--build=" #$(commencement-build-target)) |
| 1696 | (string-append "--host=" #$(commencement-build-target)) | 1701 | (string-append "--host=" #$(commencement-build-target)) |
| 1697 | "--enable-static" | 1702 | "--enable-static" |
| @@ -1711,9 +1716,10 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1711 | (uri (string-append "mirror://gnu/mpfr/mpfr-" version ".tar.gz")) | 1716 | (uri (string-append "mirror://gnu/mpfr/mpfr-" version ".tar.gz")) |
| 1712 | (sha256 | 1717 | (sha256 |
| 1713 | (base32 "1mm2zxjqxxqlacd87cxlyi63pwrxwafqks7lmpqa3wqq6a0zw9ri")))) | 1718 | (base32 "1mm2zxjqxxqlacd87cxlyi63pwrxwafqks7lmpqa3wqq6a0zw9ri")))) |
| 1714 | (native-inputs (if (target-x86?) | 1719 | (native-inputs #;(if (target-x86?) |
| 1715 | (%boot-mesboot1-inputs) | 1720 | (%boot-mesboot1-inputs) |
| 1716 | (%boot-tcc-musl-inputs))) | 1721 | (%boot-tcc-musl-inputs)) |
| 1722 | (%boot-tcc-musl-inputs)) | ||
| 1717 | (inputs '()) | 1723 | (inputs '()) |
| 1718 | (propagated-inputs (list gmp-boot)) | 1724 | (propagated-inputs (list gmp-boot)) |
| 1719 | (arguments | 1725 | (arguments |
| @@ -1721,11 +1727,12 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1721 | #:guile %bootstrap-guile | 1727 | #:guile %bootstrap-guile |
| 1722 | #:tests? #f | 1728 | #:tests? #f |
| 1723 | #:implicit-inputs? #f | 1729 | #:implicit-inputs? #f |
| 1724 | #:parallel-build? (target-x86?) | 1730 | #:parallel-build? #f#;(target-x86?) |
| 1725 | #:configure-flags | 1731 | #:configure-flags |
| 1726 | #~(list #$@(if (target-x86?) | 1732 | #~(list ;#$@(if (target-x86?) |
| 1727 | #~() | 1733 | ; #~() |
| 1728 | #~("CC=tcc")) | 1734 | ; #~("CC=tcc")) |
| 1735 | "CC=tcc" | ||
| 1729 | (string-append "--build=" #$(commencement-build-target)) | 1736 | (string-append "--build=" #$(commencement-build-target)) |
| 1730 | (string-append "--host=" #$(commencement-build-target)) | 1737 | (string-append "--host=" #$(commencement-build-target)) |
| 1731 | "--enable-static" | 1738 | "--enable-static" |
| @@ -1742,9 +1749,10 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1742 | (uri (string-append "mirror://gnu/mpc/mpc-" version ".tar.gz")) | 1749 | (uri (string-append "mirror://gnu/mpc/mpc-" version ".tar.gz")) |
| 1743 | (sha256 | 1750 | (sha256 |
| 1744 | (base32 "0n846hqfqvmsmim7qdlms0qr86f1hck19p12nq3g3z2x74n3sl0p")))) | 1751 | (base32 "0n846hqfqvmsmim7qdlms0qr86f1hck19p12nq3g3z2x74n3sl0p")))) |
| 1745 | (native-inputs (if (target-x86?) | 1752 | (native-inputs #;(if (target-x86?) |
| 1746 | (%boot-mesboot1-inputs) | 1753 | (%boot-mesboot1-inputs) |
| 1747 | (%boot-tcc-musl-inputs))) | 1754 | (%boot-tcc-musl-inputs)) |
| 1755 | (%boot-tcc-musl-inputs)) | ||
| 1748 | (inputs '()) | 1756 | (inputs '()) |
| 1749 | (propagated-inputs (list gmp-boot mpfr-boot)) | 1757 | (propagated-inputs (list gmp-boot mpfr-boot)) |
| 1750 | (arguments | 1758 | (arguments |
| @@ -1752,11 +1760,12 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1752 | #:guile %bootstrap-guile | 1760 | #:guile %bootstrap-guile |
| 1753 | #:tests? #f | 1761 | #:tests? #f |
| 1754 | #:implicit-inputs? #f | 1762 | #:implicit-inputs? #f |
| 1755 | #:parallel-build? (target-x86?) | 1763 | #:parallel-build? #f#;(target-x86?) |
| 1756 | #:configure-flags | 1764 | #:configure-flags |
| 1757 | #~(list #$@(if (target-x86?) | 1765 | #~(list ;#$@(if (target-x86?) |
| 1758 | #~() | 1766 | ; #~() |
| 1759 | #~("CC=tcc")) | 1767 | ; #~("CC=tcc")) |
| 1768 | "CC=tcc" | ||
| 1760 | (string-append "--build=" #$(commencement-build-target)) | 1769 | (string-append "--build=" #$(commencement-build-target)) |
| 1761 | (string-append "--host=" #$(commencement-build-target)) | 1770 | (string-append "--host=" #$(commencement-build-target)) |
| 1762 | "--enable-static" | 1771 | "--enable-static" |
| @@ -1863,11 +1872,10 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1863 | #:parallel-build? #f ; for debugging | 1872 | #:parallel-build? #f ; for debugging |
| 1864 | #:configure-flags | 1873 | #:configure-flags |
| 1865 | #~(let ((out (assoc-ref %outputs "out")) | 1874 | #~(let ((out (assoc-ref %outputs "out")) |
| 1866 | (libc (assoc-ref %build-inputs "libc")) | 1875 | (libc (assoc-ref %build-inputs "libc"))) |
| 1867 | (bash (assoc-ref %build-inputs "bash"))) | ||
| 1868 | (list (string-append "--prefix=" out) | 1876 | (list (string-append "--prefix=" out) |
| 1869 | (string-append "--with-build-sysroot=" libc "/include") | 1877 | (string-append "--with-build-sysroot=" libc "/include") |
| 1870 | (string-append "--with-native-system-header-dir=" libc "/include") | 1878 | ;(string-append "--with-native-system-header-dir=" libc "/include") |
| 1871 | (string-append "--build=" | 1879 | (string-append "--build=" |
| 1872 | #$(string-replace-substring | 1880 | #$(string-replace-substring |
| 1873 | (commencement-build-target) | 1881 | (commencement-build-target) |
| @@ -1916,6 +1924,7 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1916 | (let ((libc (assoc-ref inputs "libc"))) | 1924 | (let ((libc (assoc-ref inputs "libc"))) |
| 1917 | ;; Fix the dynamic linker's file name. | 1925 | ;; Fix the dynamic linker's file name. |
| 1918 | ;; This should work on gcc-13 for all architectures except loongarch. | 1926 | ;; This should work on gcc-13 for all architectures except loongarch. |
| 1927 | #; | ||
| 1919 | (substitute* (find-files "gcc/config" | 1928 | (substitute* (find-files "gcc/config" |
| 1920 | "^(aarch64-)?(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$") | 1929 | "^(aarch64-)?(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$") |
| 1921 | (("(#define MUSL_DYNAMIC_LINKER*).*$" _ dynamic-linker) | 1930 | (("(#define MUSL_DYNAMIC_LINKER*).*$" _ dynamic-linker) |
| @@ -1929,7 +1938,7 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1929 | _ gnu-user suffix) | 1938 | _ gnu-user suffix) |
| 1930 | (format #f "#define ~a_DYNAMIC_LINKER~a \"~a\"~%" | 1939 | (format #f "#define ~a_DYNAMIC_LINKER~a \"~a\"~%" |
| 1931 | gnu-user suffix | 1940 | gnu-user suffix |
| 1932 | (string-append libc "/lib/libc.so"))))))) | 1941 | (string-append libc "/lib/libc.a"))))))) |
| 1933 | (add-after 'apply-riscv64-patch 'patch-for-modern-libc | 1942 | (add-after 'apply-riscv64-patch 'patch-for-modern-libc |
| 1934 | (lambda _ | 1943 | (lambda _ |
| 1935 | (for-each | 1944 | (for-each |
| @@ -1941,6 +1950,7 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 1941 | (add-before 'configure 'setenv | 1950 | (add-before 'configure 'setenv |
| 1942 | (lambda _ | 1951 | (lambda _ |
| 1943 | (setenv "CC" "tcc") | 1952 | (setenv "CC" "tcc") |
| 1953 | (setenv "CPP" "tcc -E") ; probably | ||
| 1944 | (setenv "CFLAGS" "-D HAVE_ALLOCA_H") | 1954 | (setenv "CFLAGS" "-D HAVE_ALLOCA_H") |
| 1945 | ;; We don't have an existing C++ compiler so we need to set | 1955 | ;; We don't have an existing C++ compiler so we need to set |
| 1946 | ;; the search path manually. | 1956 | ;; the search path manually. |
| @@ -2140,9 +2150,10 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 2140 | (supported-systems '("i686-linux" "x86_64-linux" "riscv64-linux")) | 2150 | (supported-systems '("i686-linux" "x86_64-linux" "riscv64-linux")) |
| 2141 | (inputs '()) | 2151 | (inputs '()) |
| 2142 | (propagated-inputs '()) | 2152 | (propagated-inputs '()) |
| 2143 | (native-inputs (if (target-x86?) | 2153 | (native-inputs #;(if (target-x86?) |
| 2144 | (%boot-mesboot2-inputs) | 2154 | (%boot-mesboot2-inputs) |
| 2145 | (%boot-muslboot2-inputs))) | 2155 | (%boot-muslboot2-inputs)) |
| 2156 | (%boot-muslboot2-inputs)) | ||
| 2146 | (arguments | 2157 | (arguments |
| 2147 | `(#:implicit-inputs? #f | 2158 | `(#:implicit-inputs? #f |
| 2148 | #:guile ,%bootstrap-guile | 2159 | #:guile ,%bootstrap-guile |
