unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: raingloom <raingloom@riseup.net>
To: Julien Lepiller <julien@lepiller.eu>
Cc: guix-devel@gnu.org, Charles Direg <carloshujara@gmail.com>
Subject: Re: Question about compile packages
Date: Tue, 30 Mar 2021 18:12:33 +0200	[thread overview]
Message-ID: <20210330181233.18788828@riseup.net> (raw)
In-Reply-To: <97998BD7-AAB3-49CD-8C4F-E4508B8FE32E@lepiller.eu>

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	other threads:[~2021-03-31  1:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 19:05 Question about compile packages Charles Direg
2021-03-30 11:12 ` Julien Lepiller
2021-03-30 16:12   ` raingloom [this message]
2021-03-31  0:28   ` Mark H Weaver
2021-03-31 17:36     ` Vincent Legoll

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=20210330181233.18788828@riseup.net \
    --to=raingloom@riseup.net \
    --cc=carloshujara@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=julien@lepiller.eu \
    /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).