unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ekaitz Zarraga <ekaitz@elenq.tech>
To: 56516@debbugs.gnu.org, guix-devel@gnu.org
Subject: [bug#56516] [PATCH] gnu: tcc: Update to a83b28568596afd8792fd58d1a5bd157fc6b6634
Date: Tue, 12 Jul 2022 09:39:30 +0000	[thread overview]
Message-ID: <gKjhp2RLhRPH9Eo46VyO45xxEGjtKlhUdqtzQTFl6VtDcnivvEsil0UZJiGcAFMxksnZaX5ImfFYHpxsL0-wqWSsEHU_XlWKOM0MuLju5hg=@elenq.tech> (raw)

[-- 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


             reply	other threads:[~2022-07-12  9:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12  9:39 Ekaitz Zarraga [this message]
2022-07-18 11:23 ` [PATCH] gnu: tcc: Update to a83b28568596afd8792fd58d1a5bd157fc6b6634 Ludovic Courtès
2022-07-18 11:39   ` Ekaitz Zarraga
2022-07-18 12:21     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gKjhp2RLhRPH9Eo46VyO45xxEGjtKlhUdqtzQTFl6VtDcnivvEsil0UZJiGcAFMxksnZaX5ImfFYHpxsL0-wqWSsEHU_XlWKOM0MuLju5hg=@elenq.tech' \
    --to=ekaitz@elenq.tech \
    --cc=56516@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).