diff options
Diffstat (limited to 'gnu/packages/c.scm')
-rw-r--r-- | gnu/packages/c.scm | 100 |
1 files changed, 87 insertions, 13 deletions
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index d25777fdd5..62e70e1e91 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2020, 2025 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org> ;;; Copyright © 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com> -;;; Copyright © 2020, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2020, 2022, 2023 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2020, 2021 Greg Hogan <code@greghogan.com> ;;; Copyright © 2021 David Dashyan <mail@davie.li> ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com> @@ -150,7 +150,7 @@ slicing.") (define-public cproc (let ((commit "70fe9ef1810cc6c05bde9eb0970363c35fa7e802") - (revision "1")) + (revision "2")) (package (name "cproc") (version (git-version "0.0" revision commit)) @@ -162,7 +162,8 @@ slicing.") (commit commit))) (file-name (git-file-name name version)) (sha256 - (base32 "1qmgzll7z7mn587azkj4cizyyd8ii6iznfxpc66ja08140sbn9yx")))) + (base32 "1qmgzll7z7mn587azkj4cizyyd8ii6iznfxpc66ja08140sbn9yx")) + (patches (search-patches "cproc-extra-linkflags.patch")))) (build-system gnu-build-system) (arguments (list @@ -171,25 +172,50 @@ slicing.") (string-append "PREFIX=" #$output)) #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'set-glibc-library-directory + (lambda* (#:key inputs #:allow-other-keys) + (setenv "LINKFLAGS_EXTRA" + (string-append + "-L" + (dirname (search-input-file inputs "/lib/libc.so")))))) (replace 'configure (lambda* (#:key inputs #:allow-other-keys) (let ((gcc-lib (assoc-ref inputs "gcc:lib")) - (host-system #$(nix-system->gnu-triplet - (%current-system))) + (host-system #$(nix-system->gnu-triplet (%current-system))) (target-system #$(nix-system->gnu-triplet - (or (%current-target-system) - (%current-system))))) + (or (%current-target-system) + (%current-system))))) (invoke "./configure" - (string-append "--prefix=" #$output) + (string-append "--prefix=" + #$output) (string-append "--host=" host-system) (string-append "--target=" target-system) - (string-append "--with-ld=" #$(ld-for-target)) - (string-append "--with-gcc-libdir=" gcc-lib)))))))) + (string-append "--with-as=" + (search-input-file inputs + (string-append + "/bin/" + #$(as-for-target)))) + (string-append "--with-ld=" + (search-input-file inputs + (string-append + "/bin/" + #$(ld-for-target)))) + (string-append "--with-ldso=" + (search-input-file inputs + #$(glibc-dynamic-linker))) + (string-append "--with-cpp=" + (search-input-file inputs "/bin/cpp")) + (string-append "--with-qbe=" + (search-input-file inputs "/bin/qbe")) + (string-append "--with-gcc-libdir=" + (dirname (car (find-files gcc-lib + "crtbegin\\.o"))))))))))) (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, + (description + "@code{cproc} is a C compiler using QBE as a backend, supporting most of C11 along with some GCC and C2x extensions.") (home-page "https://sr.ht/~mcf/cproc") (license license:expat)))) @@ -1881,7 +1907,7 @@ output randomness while retaining speed, simplicity, and conciseness.") (define-public yyjson (package (name "yyjson") - (version "0.10.0") + (version "0.12.0") (source (origin (method git-fetch) @@ -1890,7 +1916,7 @@ output randomness while retaining speed, simplicity, and conciseness.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0kmzgs24v0rxlibg4qwlm6yplzs96pgxb1gyviijhkra9z7lx7ws")))) + (base32 "1v7vgb0wkhh23vyqnch1aiswrgy8rb7yhbyrm7gcwl8c0l92f9nl")))) (build-system cmake-build-system) (arguments (list @@ -1920,3 +1946,51 @@ JSON Patch and JSON Merge Patch. @code{.c} file. @end itemize") (license license:expat))) + +(define-public kefir + (package + (name "kefir") + (version "0.5.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~jprotopopov/kefir") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "01jclalg2mz68rcfn287kjd13inbhkgh2kslb54sjyqx3hypq4vb")))) + (build-system gnu-build-system) + (native-inputs + (list m4)) + (arguments + (list + #:test-target "test" + #:make-flags + #~(list + (string-append "CC=" #$(cc-for-target)) + (string-append "PREFIX=" #$output)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'patch-install + (lambda _ + (substitute* "Makefile.mk" + (("^EXTRA_LDFLAGS=.*$") + (string-append "EXTRA_LDFLAGS=-Wl,-rpath," + #$output + "/lib\n"))) + (substitute* "install.mk" + (("^prefix=.*$") + (string-append "prefix=" #$output + "\n")))))))) + (home-page "https://kefir.protopopov.lv/") + (synopsis "C17/C23 programming language compiler") + (description "Kefir is an independent compiler for the C17/C23 programming +language, developed by Jevgenij Protopopov. Kefir has been validated with a +test suite of 80 software projects, among which are GNU core- and binutils, +Curl, Nginx, OpenSSL, Perl, Postgresql, Tcl and many others. The compiler +targets x86_64 architecture and System-V AMD64 ABI, supporting Linux, FreeBSD, +NetBSD an OpenBSD.") + (license license:gpl3))) |