unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sarthak Shah <shahsarthakw@gmail.com>
To: "Marek Paśnikowski" <marek@marekpasnikowski.pl>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Global modification of #:make-flags
Date: Wed, 21 Aug 2024 13:15:53 +0530	[thread overview]
Message-ID: <CADBZEVmzcZx=zz_HU0XPQmBjJe24dHsVXmwiS0+2HWQuG1iNaQ@mail.gmail.com> (raw)
In-Reply-To: <878qwql473.fsf@marekpasnikowski.pl>

[-- Attachment #1: Type: text/plain, Size: 1715 bytes --]

Hey Marek,
Yep, this is a patch for the repository. I haven't figured out how to
programmatically patch it yet either; the original idea was to use
time-machine, but it was causing some errors that I wasn't able to debug.
Perhaps it's time I give it another shot.

As for -Os, check out the GCC optimization flags example in this post:

https://blog.lispy.tech/parameterized-packages-the-second-update.html

You'll have to then specify this parameter for the packages you want to
install, like so:

guix install hello --with-parameter=gcc-oflag=-Os

Back when I was working on it, there were talks about setting up global
transforms for Guix, which is how this patch was supposed to be used
globally. I am not sure if this feature has been added to Guix yet, but
once it is you can then add this transform globally. I have added features
that will check if the build system and any other user defined condition
matches before applying parameterization. Otherwise, you'll have to add
this transform to the packages you need -Os with, which is not very
difficult, just a bit cumbersome...


Regards,

Sarthak.

On Wed, Aug 21, 2024, 13:05 Marek Paśnikowski <marek@marekpasnikowski.pl>
wrote:

> Sarthak Shah <shahsarthakw@gmail.com> writes:
>
> > Another thing that needs a bit of fixing is that this doesn't work on
> > fresh Guix repositories, you need to have built Guix once from a
> > repository before applying the patch.
>
> Hold on.  Is this a patch to the guix /repository/, not /package/?  That
> would explain the patch failure.  Now I need to go and learn how to
> programmaticaly patch a channel.
>
> Any pointers on how to globally set the "-Os" CFLAG?
>
>

[-- Attachment #2: Type: text/html, Size: 2347 bytes --]

  reply	other threads:[~2024-08-21  7:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20 10:04 Global modification of #:make-flags Marek Paśnikowski
2024-08-20 10:29 ` Sarthak Shah
2024-08-20 13:13   ` Suhail Singh
2024-08-20 23:42     ` Sarthak Shah
2024-08-21  6:54       ` Suhail Singh
2024-08-21  7:27         ` Sarthak Shah
2024-08-21 14:37           ` Suhail Singh
2024-08-22 16:14             ` Sergio Pastor Pérez
2024-08-23  9:01               ` Sarthak Shah
2024-08-21  7:09   ` Marek Paśnikowski
2024-08-21  7:21     ` Sarthak Shah
2024-08-21  7:34       ` Marek Paśnikowski
2024-08-21  7:45         ` Sarthak Shah [this message]
2024-08-21  8:42           ` Marek Paśnikowski
2024-08-21 21:00 ` Ludovic Courtès
2024-09-06 16:27   ` Marek Paśnikowski
2024-08-22 16:35 ` Sergio Pastor Pérez

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='CADBZEVmzcZx=zz_HU0XPQmBjJe24dHsVXmwiS0+2HWQuG1iNaQ@mail.gmail.com' \
    --to=shahsarthakw@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=marek@marekpasnikowski.pl \
    /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).