unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#56516] [PATCH] gnu: tcc: Update to a83b28568596afd8792fd58d1a5bd157fc6b6634
@ 2022-07-12  9:39 Ekaitz Zarraga
  2022-07-18 11:23 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Ekaitz Zarraga @ 2022-07-12  9:39 UTC (permalink / raw)
  To: 56516, guix-devel

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

Hi,

With this patch the tcc build issue is fixed, the downside is that it's
set to an specific commit and not a release.

It also separates tcc-boot from the tcc source, so it does not interfere
in the bootstrapping process (the patch moves the source of tcc to git
and that produces a circular dependency).

I hope this is useful.

Best,
Ekaitz

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-tcc-Update-to-a83b28568596afd8792fd58d1a5bd157fc.patch --]
[-- Type: text/x-patch; name=0001-gnu-tcc-Update-to-a83b28568596afd8792fd58d1a5bd157fc.patch, Size: 8013 bytes --]

From ed05cfb9356fb5b07be48c54b9ec33eab672de61 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Tue, 12 Jul 2022 11:05:15 +0200
Subject: [PATCH] gnu: tcc: Update to a83b28568596afd8792fd58d1a5bd157fc6b6634

* gnu/packages/c.scm (tcc): Update to a83b28568596afd8792fd58d1a5bd157fc6b6634

* gnu/packages/commencement.scm (tcc-boot)[source]: Remove dependency on
tcc.
---
 gnu/packages/c.scm            | 110 ++++++++++++++++++----------------
 gnu/packages/commencement.scm |   9 ++-
 2 files changed, 66 insertions(+), 53 deletions(-)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index b1f68c706b..c5afc2fc1c 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org>
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -112,58 +113,63 @@ (define-public cproc
       (license license:expat))))
 
 (define-public tcc
-  (package
-    (name "tcc")                                  ;aka. "tinycc"
-    (version "0.9.27")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://savannah/tinycc/tcc-"
-                                  version ".tar.bz2"))
-              (sha256
-               (base32
-                "177bdhwzrnqgyrdv1dwvpd04fcxj68s5pm1dzwny6359ziway8yy"))))
-    (build-system gnu-build-system)
-    (native-inputs (list perl texinfo))
-    (arguments
-     `(#:configure-flags (list (string-append "--elfinterp="
-                                              (assoc-ref %build-inputs "libc")
-                                              ,(glibc-dynamic-linker))
-                               (string-append "--crtprefix="
-                                              (assoc-ref %build-inputs "libc")
-                                              "/lib")
-                               (string-append "--sysincludepaths="
-                                              (assoc-ref %build-inputs "libc")
-                                              "/include:"
-                                              (assoc-ref %build-inputs
-                                                         "kernel-headers")
-                                              "/include:{B}/include")
-                               (string-append "--libpaths="
-                                              (assoc-ref %build-inputs "libc")
-                                              "/lib")
-                               ,@(if (string-prefix? "armhf-linux"
-                                                     (or (%current-target-system)
-                                                         (%current-system)))
-                                     `("--triplet=arm-linux-gnueabihf")
-                                     '()))
-       #:test-target "test"))
-    (native-search-paths
-     (list (search-path-specification
-            (variable "CPATH")
-            (files '("include")))
-           (search-path-specification
-            (variable "LIBRARY_PATH")
-            (files '("lib" "lib64")))))
-    ;; Fails to build on MIPS: "Unsupported CPU"
-    (supported-systems (delete "mips64el-linux" %supported-systems))
-    (synopsis "Tiny and fast C compiler")
-    (description
-     "TCC, also referred to as \"TinyCC\", is a small and fast C compiler
-written in C.  It supports ANSI C with GNU and extensions and most of the C99
-standard.")
-    (home-page "http://www.tinycc.org/")
-    ;; An attempt to re-licence tcc under the Expat licence is underway but not
-    ;; (if ever) complete.  See the RELICENSING file for more information.
-    (license license:lgpl2.1+)))
+  (let ((revision "1")
+        (commit  "a83b28568596afd8792fd58d1a5bd157fc6b6634"))
+    (package
+      (name "tcc")                                  ;aka. "tinycc"
+      (version (git-version "0.9.27" revision commit))
+      (source
+        (origin
+          (method git-fetch)
+          (uri (git-reference
+                 (url "git://repo.or.cz/tinycc.git")
+                 (commit commit)))
+          (file-name (git-file-name name version))
+          (sha256
+            (base32
+              "01znw86fg73x3k0clafica4b6glbhz69p588kvp766i0zgvs68dh"))))
+      (build-system gnu-build-system)
+      (native-inputs (list perl texinfo))
+      (arguments
+        `(#:configure-flags (list (string-append "--elfinterp="
+                                                 (assoc-ref %build-inputs "libc")
+                                                 ,(glibc-dynamic-linker))
+                                  (string-append "--crtprefix="
+                                                 (assoc-ref %build-inputs "libc")
+                                                 "/lib")
+                                  (string-append "--sysincludepaths="
+                                                 (assoc-ref %build-inputs "libc")
+                                                 "/include:"
+                                                 (assoc-ref %build-inputs
+                                                            "kernel-headers")
+                                                 "/include:{B}/include")
+                                  (string-append "--libpaths="
+                                                 (assoc-ref %build-inputs "libc")
+                                                 "/lib")
+                                  ,@(if (string-prefix? "armhf-linux"
+                                                        (or (%current-target-system)
+                                                            (%current-system)))
+                                      `("--triplet=arm-linux-gnueabihf")
+                                      '()))
+          #:test-target "test"))
+      (native-search-paths
+        (list (search-path-specification
+                (variable "CPATH")
+                (files '("include")))
+              (search-path-specification
+                (variable "LIBRARY_PATH")
+                (files '("lib" "lib64")))))
+      ;; Fails to build on MIPS: "Unsupported CPU"
+      (supported-systems (delete "mips64el-linux" %supported-systems))
+      (synopsis "Tiny and fast C compiler")
+      (description
+        "TCC, also referred to as \"TinyCC\", is a small and fast C compiler
+        written in C.  It supports ANSI C with GNU and extensions and most of the C99
+        standard.")
+        (home-page "http://www.tinycc.org/")
+        ;; An attempt to re-licence tcc under the Expat licence is underway but not
+        ;; (if ever) complete.  See the RELICENSING file for more information.
+        (license license:lgpl2.1+))))
 
 (define-public pcc
   (package
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 820ff7281f..60b06c0901 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
 ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -808,7 +809,13 @@ (define tcc-boot
     (inherit tcc-boot0)
     (name "tcc-boot")
     (version "0.9.27")
-    (source (package-source tcc))
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://savannah/tinycc/tcc-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32
+                "177bdhwzrnqgyrdv1dwvpd04fcxj68s5pm1dzwny6359ziway8yy"))))
     (build-system gnu-build-system)
     (inputs '())
     (propagated-inputs '())

base-commit: 6a6d9a858ef07571089f2f87466641f1374666b0
-- 
2.36.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: tcc: Update to a83b28568596afd8792fd58d1a5bd157fc6b6634
  2022-07-12  9:39 [bug#56516] [PATCH] gnu: tcc: Update to a83b28568596afd8792fd58d1a5bd157fc6b6634 Ekaitz Zarraga
@ 2022-07-18 11:23 ` Ludovic Courtès
  2022-07-18 11:39   ` Ekaitz Zarraga
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2022-07-18 11:23 UTC (permalink / raw)
  To: Ekaitz Zarraga; +Cc: guix-patches, guix-devel

Egun on!

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

> With this patch the tcc build issue is fixed, the downside is that it's
> set to an specific commit and not a release.

Is it because there’s no newer release?  (I can add a comment to that
effect when committing.)

> It also separates tcc-boot from the tcc source, so it does not interfere
> in the bootstrapping process (the patch moves the source of tcc to git
> and that produces a circular dependency).
>
> I hope this is useful.

It is!

Thanks,
Ludo’.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: tcc: Update to a83b28568596afd8792fd58d1a5bd157fc6b6634
  2022-07-18 11:23 ` Ludovic Courtès
@ 2022-07-18 11:39   ` Ekaitz Zarraga
  2022-07-18 12:21     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Ekaitz Zarraga @ 2022-07-18 11:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-patches, guix-devel\@gnu.org

Saluton,

> Egun on!
>
> Ekaitz Zarraga ekaitz@elenq.tech skribis:
>
> > With this patch the tcc build issue is fixed, the downside is that it's
> > set to an specific commit and not a release.
>
>
> Is it because there’s no newer release? (I can add a comment to that
> effect when committing.)


They are planning a release because they didn't make any in a very, very long time. But they'll need time until everything is set up.

Ekaitz


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: tcc: Update to a83b28568596afd8792fd58d1a5bd157fc6b6634
  2022-07-18 11:39   ` Ekaitz Zarraga
@ 2022-07-18 12:21     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2022-07-18 12:21 UTC (permalink / raw)
  To: Ekaitz Zarraga; +Cc: 56516-done, guix-devel

Hi,

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

> They are planning a release because they didn't make any in a very, very long time. But they'll need time until everything is set up.

Alright.  I split the patch into two commits, added a comment about the
release, passed it through ‘guix style’, and applied.

Thanks!

Ludo’.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-18 12:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12  9:39 [bug#56516] [PATCH] gnu: tcc: Update to a83b28568596afd8792fd58d1a5bd157fc6b6634 Ekaitz Zarraga
2022-07-18 11:23 ` Ludovic Courtès
2022-07-18 11:39   ` Ekaitz Zarraga
2022-07-18 12:21     ` Ludovic Courtès

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).