* [bug#57060] [PATCH] gnu: pcc: Fix build.
@ 2022-08-08 16:35 ( via Guix-patches via
2022-08-08 18:33 ` Maxime Devos
2022-08-08 19:08 ` [bug#57060] [PATCH v2 1/2] " ( via Guix-patches via
0 siblings, 2 replies; 6+ messages in thread
From: ( via Guix-patches via @ 2022-08-08 16:35 UTC (permalink / raw)
To: 57060; +Cc: (
* gnu/packages/c.scm (pcc)[arguments]: Use gexps.
<#:phases>{fix-multiple-definitions}: New phase.
[native-inputs]: Adjust formatting.
---
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 @@ (define-public pcc
"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
--
2.37.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#57060] [PATCH] gnu: pcc: Fix build.
2022-08-08 16:35 [bug#57060] [PATCH] gnu: pcc: Fix build ( via Guix-patches via
@ 2022-08-08 18:33 ` Maxime Devos
2022-08-08 18:53 ` ( via Guix-patches via
2022-08-08 19:08 ` [bug#57060] [PATCH v2 1/2] " ( via Guix-patches via
1 sibling, 1 reply; 6+ messages in thread
From: Maxime Devos @ 2022-08-08 18:33 UTC (permalink / raw)
To: (, 57060
[-- Attachment #1.1.1: Type: text/plain, Size: 809 bytes --]
On 08-08-2022 18:35, ( via Guix-patches via wrote:
> + (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, ") ""))))
This looks like something upstream needs to know about.
> + (replace 'check
> + (lambda _
> + (invoke "make" "-C" "cc/cpp" "test"))))))
(when tests? ...), in a follow-up or preceding patch (t was present in
the old code), for --without-tests.
Greetings,
Maxime.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#57060] [PATCH] gnu: pcc: Fix build.
2022-08-08 18:33 ` Maxime Devos
@ 2022-08-08 18:53 ` ( via Guix-patches via
0 siblings, 0 replies; 6+ messages in thread
From: ( via Guix-patches via @ 2022-08-08 18:53 UTC (permalink / raw)
To: Maxime Devos, 57060
On Mon Aug 8, 2022 at 7:33 PM BST, Maxime Devos wrote:
> This looks like something upstream needs to know about.
I'm not sure upstream is particularly active. Also, the home-page is
down, so I'm not sure how to contact them :)
> (when tests? ...), in a follow-up or preceding patch (t was present in
> the old code), for --without-tests.
Good point!
-- (
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#57060] [PATCH v2 1/2] gnu: pcc: Fix build.
2022-08-08 16:35 [bug#57060] [PATCH] gnu: pcc: Fix build ( via Guix-patches via
2022-08-08 18:33 ` Maxime Devos
@ 2022-08-08 19:08 ` ( via Guix-patches via
2022-08-08 19:08 ` [bug#57060] [PATCH v2 2/2] gnu: pcc: Respect --without-tests ( via Guix-patches via
1 sibling, 1 reply; 6+ messages in thread
From: ( via Guix-patches via @ 2022-08-08 19:08 UTC (permalink / raw)
To: 57060; +Cc: (
* gnu/packages/c.scm (pcc)[arguments]: Use gexps.
<#:phases>{fix-multiple-definitions}: New phase.
[native-inputs]: Adjust formatting.
---
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 @@ (define-public pcc
"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
--
2.37.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#57060] [PATCH v2 2/2] gnu: pcc: Respect --without-tests.
2022-08-08 19:08 ` [bug#57060] [PATCH v2 1/2] " ( via Guix-patches via
@ 2022-08-08 19:08 ` ( via Guix-patches via
2022-08-11 8:29 ` bug#57060: [PATCH] gnu: pcc: Fix build Mathieu Othacehe
0 siblings, 1 reply; 6+ messages in thread
From: ( via Guix-patches via @ 2022-08-08 19:08 UTC (permalink / raw)
To: 57060; +Cc: (
* gnu/packages/c.scm (pcc)[arguments]<#:phases>{check}: Respect the
`tests?` argument.
---
gnu/packages/c.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 113a331070..39f048e993 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -197,8 +197,9 @@ (define-public pcc
(substitute* (list "cc/ccom/scan.l" "cc/cxxcom/scan.l")
(("lineno, ") ""))))
(replace 'check
- (lambda _
- (invoke "make" "-C" "cc/cpp" "test"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "-C" "cc/cpp" "test")))))))
(native-inputs (list bison flex))
(synopsis "Portable C compiler")
(description
--
2.37.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-08-11 8:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-08 16:35 [bug#57060] [PATCH] gnu: pcc: Fix build ( via Guix-patches via
2022-08-08 18:33 ` Maxime Devos
2022-08-08 18:53 ` ( via Guix-patches via
2022-08-08 19:08 ` [bug#57060] [PATCH v2 1/2] " ( via Guix-patches via
2022-08-08 19:08 ` [bug#57060] [PATCH v2 2/2] gnu: pcc: Respect --without-tests ( via Guix-patches via
2022-08-11 8:29 ` bug#57060: [PATCH] gnu: pcc: Fix build Mathieu Othacehe
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.