unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>
To: Christopher Rodriguez <yewscion@gmail.com>, 58100@debbugs.gnu.org
Subject: [bug#58100] [PATCH] gnu: cbqn: factor out singeli into derivative package.
Date: Tue, 27 Sep 2022 09:26:26 +0200	[thread overview]
Message-ID: <982732ff807d152d4e8c181e3c33ca03ea72ac4b.camel@ist.tugraz.at> (raw)
In-Reply-To: <20220926191212.30609-1-yewscion@gmail.com>

Am Montag, dem 26.09.2022 um 15:12 -0400 schrieb Christopher Rodriguez:
> Persuant to a recent conversation[1] with upstream, I've factored the
> AVX2-dependent builds into their own package (defaulting to a generic
> build
> instead).
> 
> + gnu/packages/bqn.scm: cbqn-singeli
> ~ gnu/packages/bqn.scm: cbqn: changed make flags, inputs, and commit.
This is not how to write a ChangeLog.  See [1] or infer from other
commits.

> ---
>  gnu/packages/bqn.scm | 45 ++++++++++++++++++++++++++++++++++++++----
> --
>  1 file changed, 39 insertions(+), 6 deletions(-)
> 
> diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
> index c4e0f39efb..56705beede 100644
> --- a/gnu/packages/bqn.scm
> +++ b/gnu/packages/bqn.scm
> @@ -126,7 +126,7 @@ (define bqn-sources
>  
>  (define cbqn-bootstrap
>    (let* ((revision "1")
> -         (commit "9c1cbdc99863b1da0116df61cd832137b196dc5c"))
> +         (commit "bd823839feaf42af4013e5a245981f58f563e659"))
Why are you changing the bootstrap commit?  This looks suspicious.
>      (package
>        (name "cbqn-bootstrap")
>        (version (git-version "0" "1" commit))
> @@ -138,7 +138,7 @@ (define cbqn-bootstrap
>                  (file-name (git-file-name name version))
>                  (sha256
>                   (base32
> -                 
> "0w38fhwf20drkyijy6nfnhmc5g5gw0zmzgmy1q605x57znlj85a2"))))
> +                 
> "0735mixvpgp2g1jsmbg7aaw35r4xs348y7djkwdvb0193ais6xz2"))))
>        (build-system gnu-build-system)
>        (arguments
>         (list #:tests? #f                         ;skipping tests for
> bootstrap
> @@ -182,12 +182,9 @@ (define-public cbqn
>      (name "cbqn")
>      (outputs '("out" "lib"))
>      (arguments
> -     (list #:make-flags '(list "shared-o3" "o3n-singeli")
> +     (list #:make-flags '(list "shared-o3" "o3")
Okay
>             #:phases #~(modify-phases %standard-phases
>                          (delete 'configure)
> -                        (add-before 'build 'link-singeli
> -                          (lambda* (#:key inputs #:allow-other-keys)
> -                            (symlink #+singeli-sources "Singeli")))
>                          (add-before 'build 'generate-bytecode
>                            (lambda* (#:key inputs #:allow-other-keys)
>                              (system (string-append #+dbqn
> @@ -222,3 +219,39 @@ (define-public cbqn
>                           libffi
>                           clang-toolchain
>                           linux-libre-headers))))
> +(define-public cbqn-singeli
> +  (package
> +    (inherit cbqn)
> +    (name "cbqn-singeli")
> +    (outputs '("out"))
> +    (arguments
> +     (list #:make-flags '(list "singeli=1 f='-mavx2 -mbmi2 -O3' c")
> +           #:phases #~(modify-phases %standard-phases
> +                        (delete 'configure)
> +                        (add-before 'build 'link-singeli
> +                          (lambda* (#:key inputs #:allow-other-keys)
> +                            (symlink #+singeli-sources "Singeli")))
> +                        (add-before 'build 'generate-bytecode
> +                          (lambda* (#:key inputs #:allow-other-keys)
> +                            (system (string-append #+dbqn
> +                                                   "/bin/dbqn
> ./genRuntime "
> +                                                   #+bqn-sources))))
> +                        (replace 'check
> +                          (lambda* (#:key inputs tests? #:allow-
> other-keys)
> +                            (when tests?
> +                              (system (string-append "./BQN -M 1000
> \""
> +                                                     #+bqn-sources
> +                                                    
> "/test/this.bqn\""))
> +                              (map (lambda (x)
> +                                     (system (string-append "./BQN
> ./test/" x
> +                                                           
> ".bqn")))
> +                                   '("cmp" "equal" "copy"
> "random")))))
> +                        (replace 'install
> +                          (lambda* (#:key outputs #:allow-other-
> keys)
> +                            (let* ((bin (string-append (assoc-ref
> outputs
> +                                                                 
> "out")
> +                                                       "/bin")))
> +                              (mkdir-p bin)
> +                              (copy-recursively "BQN"
> +                                                (string-append bin
> "/bqn"))))))))))
> +
Instead of providing a singeli variant, would just tuning the package
suffice?  If not, I think we should try to properly unbundle singeli
(as in build an actual singeli package) before adding another package
variant.  Then, you could use existing patterns to decide whether to
use singeli by making it an input or not.

Cheers

[1] https://www.gnu.org/prep/standards/html_node/Change-Logs.html

  parent reply	other threads:[~2022-09-27  8:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 19:03 [bug#58100] cbqn currently targets AVX2 Christopher Rodriguez
2022-09-26 19:12 ` [bug#58100] [PATCH] gnu: cbqn: factor out singeli into derivative package Christopher Rodriguez
2022-09-26 19:17   ` Christopher Rodriguez
2022-09-27  7:26   ` Liliana Marie Prikler [this message]
2022-09-27 17:27     ` Christopher Rodriguez
2022-09-28  7:41       ` Liliana Marie Prikler
2022-10-22 18:23 ` [bug#58100] [PATCH v2 1/8] cbqn: Build without singeli Liliana Marie Prikler
2022-11-06 17:39   ` [bug#58100] cbqn currently targets AVX2 Ludovic Courtès
2022-11-06 18:25     ` Liliana Marie Prikler
2022-11-07 13:35       ` Ludovic Courtès
2022-11-07 21:03         ` bug#58100: " Liliana Marie Prikler
2022-10-22 18:25 ` [bug#58100] [PATCH v2 2/8] gnu: Remove singeli-sources Liliana Marie Prikler
2022-10-22 18:28 ` [bug#58100] [PATCH v2 3/8] gnu: cbqn-bootstrap: Use let-bound revision Liliana Marie Prikler
2022-10-22 18:34 ` [bug#58100] [PATCH v2 4/8] gnu: cbqn: Rewrite in terms of cbqn-bootstrap Liliana Marie Prikler
2022-10-22 18:43 ` [bug#58100] [PATCH v2 5/8] gnu: cbqn: Build using GCC Liliana Marie Prikler
2022-10-22 18:59 ` [bug#58100] [PATCH v2 6/8] gnu: dbqn: Install regular files rather than copying them recursively Liliana Marie Prikler
2022-10-22 19:01 ` [bug#58100] [PATCH v2 8/8] gnu: cbqn: " Liliana Marie Prikler
2022-10-22 19:01 ` [bug#58100] [PATCH v2 7/8] gnu: cbqn-bootstrap: " Liliana Marie Prikler

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=982732ff807d152d4e8c181e3c33ca03ea72ac4b.camel@ist.tugraz.at \
    --to=liliana.prikler@ist.tugraz.at \
    --cc=58100@debbugs.gnu.org \
    --cc=yewscion@gmail.com \
    /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).