Hi, Marek Paśnikowski <ma...@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! HTH! Ludo’.