aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/c.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-08-11 22:15:22 +0200
committerMarius Bakke <marius@gnu.org>2022-08-11 22:15:22 +0200
commitb50eaa67642ebc25e9c896f2e700c08610e0a5da (patch)
treee3358208e17a836c2e3cdb3125f815a2ab35c2b8 /gnu/packages/c.scm
parent7b69cd07408bf64fff026e4597920a90259e3205 (diff)
parent99b73f60415b282f2be39134f385cbda4840c336 (diff)
downloadguix-b50eaa67642ebc25e9c896f2e700c08610e0a5da.tar
guix-b50eaa67642ebc25e9c896f2e700c08610e0a5da.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/c.scm')
-rw-r--r--gnu/packages/c.scm22
1 files changed, 16 insertions, 6 deletions
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 1630a40d17..39f048e993 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,21 @@ 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* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (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