help-guix
[Top][All Lists]
Advanced

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

Re: How to compile native?


From: Xinglu Chen
Subject: Re: How to compile native?
Date: Wed, 14 Apr 2021 21:18:28 +0200

On Wed, Apr 14 2021, Vincent Legoll wrote:

>> If you wanted to compile packages with specific compile flags, then
>> you'll need to make custom package definitions.
>
> That's probably what Charles wants, but in a global way, settings
> CFLAGS once for the whole distro.

The manual mentions the ‘package-input-rewriting’ procedure in section
“8.3 Defining Package Variants”.  I guess you could write something like
this in a manifest file:

--8<---------------cut here---------------start------------->8---
(define custom-package
  (package
    (inherit some-package)
    ...))
    
(define package-custom-cflags
  ;; This is a procedure to replace SOME-PACKAGE by CUSTOM-PACKAGE
  ;; recursively.
  (package-input-rewriting `((,some-package . ,custom-package))))

(packages->manifest
  (map package-custom-cflags (list package1 package2 ...)))
--8<---------------cut here---------------end--------------->8---

Totally untested though.




reply via email to

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