1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: gcc-muslboot0: Apply patches in the package source.

* gnu/packages/commencement.scm (gcc-muslboot0)[source]: Add patch.
[arguments]: Remove custom phase applying patch.
(gcc-muslboot): Adjust accordingly.

Change-Id: Ie502ac2db65b8928b84ddbcb65e82151156f08e7
This commit is contained in:
Efraim Flashner
2024-12-17 09:33:51 +02:00
committed by Janneke Nieuwenhuizen
parent 9fb7d5aeb6
commit f4256280ee

View File

@@ -1822,13 +1822,15 @@ ac_cv_c_float_format='IEEE (little-endian)'
(inherit gcc-4.7)
(name "gcc-muslboot0")
(version "4.6.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gcc/gcc-"
version "/gcc-core-" version ".tar.gz"))
(sha256
(base32
"173kdb188qg79pcz073cj9967rs2vzanyjdjyxy9v0xb0p5sad75"))))
(source
(bootstrap-origin
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/gcc/gcc-"
version "/gcc-core-" version ".tar.gz"))
(sha256
(base32 "173kdb188qg79pcz073cj9967rs2vzanyjdjyxy9v0xb0p5sad75"))
(patches (search-patches "gcc-boot-4.6.4-riscv64-support.patch")))))
(outputs '("out"))
(inputs (list gmp-boot mpfr-boot mpc-boot))
(native-inputs (%boot-tcc-musl-inputs))
@@ -1879,12 +1881,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
"--disable-build-with-cxx"))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'apply-riscv64-patch
(lambda* (#:key inputs #:allow-other-keys)
(let ((patch-file
#$(local-file
(search-patch "gcc-boot-4.6.4-riscv64-support.patch"))))
(invoke "patch" "--force" "-p1" "-i" patch-file))))
(add-after 'unpack 'fix-alloca
(lambda* (#:key inputs #:allow-other-keys)
(substitute* (list "libiberty/alloca.c"
@@ -1909,7 +1905,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(format #f "#define ~a_DYNAMIC_LINKER~a \"~a\"~%"
gnu-user suffix
(string-append libc "/lib/libc.so")))))))
(add-after 'apply-riscv64-patch 'patch-for-modern-libc
(add-after 'unpack 'patch-for-modern-libc
(lambda _
(for-each
(lambda (dir)
@@ -2072,7 +2068,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
else
_cpp_define_builtin (pfile, \"__cplusplus 199711L\");
}")))))
(delete 'apply-riscv64-patch)
(replace 'setenv
(lambda _
(setenv "CC" "musl-gcc")