GNU bug report logs -
#53834
[PATCH] gnu: Add cproc.
Previous Next
Reported by: jgart <jgart <at> dismail.de>
Date: Mon, 7 Feb 2022 01:58:01 UTC
Severity: normal
Tags: patch
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/packages/c.scm (cproc): New variable.
Signed-off-by: (unmatched-parenthesis <paren <at> disroot.org>
---
gnu/packages/c.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 1e3296dae1..e03ea2e6eb 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -46,6 +46,7 @@ (define-module (gnu packages c)
#:use-module (gnu packages bison)
#:use-module (gnu packages check)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages perl)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages guile)
@@ -1097,3 +1098,48 @@ (define-public qbe
performance of advanced compilers such as LLVM and GCC in only 10% of the code.")
(home-page "https://c9x.me/compile/")
(license license:expat))))
+
+(define-public cproc
+ (let ((commit "70fe9ef1810cc6c05bde9eb0970363c35fa7e802")
+ (revision "1"))
+ (package
+ (name "cproc")
+ (version (git-version "0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.sr.ht/~mcf/cproc")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1qmgzll7z7mn587azkj4cizyyd8ii6iznfxpc66ja08140sbn9yx"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags ,#~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "PREFIX=" #$output))
+ #:phases
+ ,#~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (gcc-lib (assoc-ref inputs "gcc:lib"))
+ (ld #$(ld-for-target))
+ (host-system #$(nix-system->gnu-triplet (%current-system)))
+ (target-system
+ #$(nix-system->gnu-triplet (or (%current-target-system)
+ (%current-system)))))
+ (invoke "./configure"
+ (string-append "--prefix=" out)
+ (string-append "--host=" host-system)
+ (string-append "--target=" target-system)
+ (string-append "--with-ld=" ld)
+ (string-append "--with-gcc-libdir=" gcc-lib))))))))
+ (inputs `(("qbe" ,qbe)
+ ("gcc:lib" ,gcc "lib")))
+ (supported-systems (list "x86_64-linux" "aarch64-linux"))
+ (synopsis "Simple C11 compiler backed by QBE")
+ (description "@code{cproc} is a C compiler using QBE as a backend. It
+currently supports C11 along with some GCC and C2x extensions.")
+ (home-page "https://sr.ht/~mcf/cproc")
+ (license license:expat))))
--
2.36.0
This bug report was last modified 2 years and 322 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.