guix-devel
[Top][All Lists]
Advanced

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

Re: Question about compile packages


From: raingloom
Subject: Re: Question about compile packages
Date: Tue, 30 Mar 2021 18:12:33 +0200

On Tue, 30 Mar 2021 07:12:27 -0400
Julien Lepiller <julien@lepiller.eu> wrote:

> Not sure about your first question. Maybe create your own fork and
> regularly rebase it? Guix will not be very happy with that I think,
> but it should work.
> 
> To pass --no-substitutes, you can pass it to guix-daemon, or remove
> the authorized keys from /etc/guix/acl. The second option lets you
> download substitutes for fixed output derivations (basically source
> tarballs), so it's easier in case some of those tarballs disappear
> from their original location.
> 
> I think the first option is selectable from the installer, but I
> might be wrong. Otherwise, stop guix-daemon from herd and run it
> manually with your options.
> 
> Le 29 mars 2021 15:05:08 GMT-04:00, Charles Direg
> <carloshujara@gmail.com> a écrit :
> > Dear,
> >
> >How can I modify the flags that any program is compiled with within
> >guix? That
> >is, I can allow in the gnu-build-system to modify it globally so
> >that I can
> >add the build flags to any package, for example, add the flags -O2
> >-march=native -mtune=native so global as I already mentioned, so that
> >these
> >are added to each package at the time of compilation, this would not
> >be within the guix development environment, because what I want is
> >that this
> >compilation is natively for my pc.
> >
> >As a second question, how could I set the --no-susbtitutes option
> >when installing the guix system from ISO, since I would like all
> >installed packages to be compiled natively first?
> >
> >I really appreciate your kind time and I look forward to your
> >responses.
> >
> >Sincerely,
> >~ Abraham Huerta  

I'm mostly guessing here, but wrapping gcc with a script that sets the
options you want might work. Could try creating a gcc-toolchain that
is set up the way you want it (don't even have to recompile, like i
said, just create a wrapper script that calls the original toolchain)
and then run guix build --with-toolchain=gcc-impure-native-toolchain

At least that's how I'd get started.

You could also just modify the toolchain package, but then you'd have
to recompile everything.

Anyways, if you want -march=native optimisations, there is some recent
discussion around some new GCC feature that detects CPU features at
runtime. The high performance computing (HPC) related developers are
very interested in using it in Guix.



reply via email to

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