guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: pcc: Fix build.


From: guix-commits
Subject: 01/02: gnu: pcc: Fix build.
Date: Thu, 11 Aug 2022 04:27:17 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit dfda2cc5f6a57a0b89b98f389a2f28bf1e94eaa4
Author: ( <paren@disroot.org>
AuthorDate: Mon Aug 8 20:08:38 2022 +0100

    gnu: pcc: Fix build.
    
    * gnu/packages/c.scm (pcc)[arguments]: Use gexps.
    <#:phases>{fix-multiple-definitions}: New phase.
    [native-inputs]: Adjust formatting.
    
    Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 gnu/packages/c.scm | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 1630a40d17..113a331070 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org>
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech>
+;;; Copyright © 2022 ( <paren@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -185,12 +186,20 @@ standard.")
                 "1p34w496095mi0473f815w6wbi57zxil106mg7pj6sg6gzpjcgww"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _ (invoke "make" "-C" "cc/cpp" "test") #t)))))
-    (native-inputs
-     (list bison flex))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-multiple-definitions
+                 (lambda _
+                   ;; Certain variables are defined multiple times. This
+                   ;; upsets the linker and causes a build failure.
+                   (substitute* "cc/ccom/pass1.h"
+                     (("FLT flt_zero;") "extern FLT flt_zero;"))
+                   (substitute* (list "cc/ccom/scan.l" "cc/cxxcom/scan.l")
+                     (("lineno, ") ""))))
+               (replace 'check
+                 (lambda _
+                   (invoke "make" "-C" "cc/cpp" "test"))))))
+    (native-inputs (list bison flex))
     (synopsis "Portable C compiler")
     (description
      "PCC is a portable C compiler.  The project goal is to write a C99



reply via email to

[Prev in Thread] Current Thread [Next in Thread]