mirror of
https://codeberg.org/guix/guix.git
synced 2026-04-28 06:34:05 +00:00
gnu: Add tcc-musl.
* gnu/packages/commencement.scm (tcc-musl): New variable. Co-authored-by: Efraim Flashner <efraim@flashner.co.il> Change-Id: I4031733b8c11551b86dac373735712123bf9aafe
This commit is contained in:
committed by
Efraim Flashner
parent
e172f8d2a2
commit
73ff860ec0
@@ -1055,6 +1055,46 @@ MesCC-Tools), and finally M2-Planet.")
|
||||
(install-file "libtcc1.a" (string-append out "/lib"))
|
||||
(install-file "libtcc1.a" (string-append out "/lib/tcc")))))))))))
|
||||
|
||||
(define tcc-musl
|
||||
(package
|
||||
(inherit tcc-boot-musl)
|
||||
(name "tcc-musl")
|
||||
(native-inputs (modify-inputs (package-native-inputs tcc-boot-musl)
|
||||
(replace "tcc" tcc-boot-musl)))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments tcc-boot-musl)
|
||||
((#:phases phases)
|
||||
#~(modify-phases #$phases
|
||||
(replace 'build
|
||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
(libc (assoc-ref inputs "libc"))
|
||||
(interpreter "/musl/loader"))
|
||||
(invoke
|
||||
"tcc"
|
||||
"-g"
|
||||
"-vvv"
|
||||
"-D" "REG_PC=0"
|
||||
"-D" "REG_S0=8"
|
||||
"-D" "ONE_SOURCE=1"
|
||||
"-D" "TCC_VERSION=\"0.9.28rc\""
|
||||
"-D" "CONFIG_TCC_STATIC=1"
|
||||
"-D" "CONFIG_USE_LIBGCC=1"
|
||||
"-D" "CONFIG_TCC_SEMLOCK=0"
|
||||
"-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"")
|
||||
"-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" libc "/lib\"")
|
||||
"-D" (string-append "CONFIG_TCC_ELFINTERP=\"" interpreter "\"")
|
||||
"-D" (string-append "CONFIG_TCC_LIBPATHS=\"" libc "/lib:"
|
||||
out "/lib:"
|
||||
"{B}/lib:.\"")
|
||||
"-D" (string-append "CONFIG_TCC_SYSINCLUDEPATHS=\""
|
||||
libc "/include:"
|
||||
out "/include:"
|
||||
"{B}/include\"")
|
||||
"-D" (string-append "TCC_LIBGCC=\"" libc "/lib/libc.a\"")
|
||||
"-o" "tcc"
|
||||
"tcc.c"))))))))))
|
||||
|
||||
(define binutils-mesboot0
|
||||
;; The initial Binutils
|
||||
(package
|
||||
|
||||
Reference in New Issue
Block a user