guix-devel
[Top][All Lists]
Advanced

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

Re: Global modification of #:make-flags


From: Marek Paśnikowski
Subject: Re: Global modification of #:make-flags
Date: Fri, 06 Sep 2024 18:27:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Ludovic Courtès <ludo@gnu.org> writes:

Good afternoon.

I apologise for late reply — I am still catching up with my digital life
backlog.

> Hi,
>
> Marek Paśnikowski <marek@marekpasnikowski.pl> skribis:
>
>> In order to prevent the XY problem, here is my goal: Rebuild the entire
>> system with -Os optimization level.  It is an experiment into viability
>> of hardware-targeted optimizations.
>
> Instead of trying to override #:make-flags, which is likely fragile as
> it depends on details of each package’s build system, I would use a
> strategy similar to that of ‘--tune’.
>
> For ‘--tune’, the ‘tuning-compiler’ procedure in (guix transformations)
> produces a compiler wrapper that passes ‘-march=whatever’, and
> ‘tuned-package’ injects that wrapper in the package of interest.
>
> In fact you could reuse most of the code here to do what you want.  And
> we could create a package transformation for ‘-Os’.  Could be neat!

I appreciate the pointers about transformations.  Did you mean to
suggest to implement a new transformation dedicated to the O levels?
This is how I interpreted your response.

Also, I am still failing to see how I could apply /any/ transformations
to the operating-system records.  I admit, I still know little about
sub-surface features of Guix.

In the adjacent message, Sergio Perez mentioned a map-derivation
function.  The documentation I found about it is /very/ cryptic.

  “Given MAPPING, a list of pairs of derivations, return a derivation
based on DRV where all the 'car's of MAPPING have been replaced by its
'cdr's, recursively.”

  Should I get more familiar with this function, if I want to transform
  operating-system?



reply via email to

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