Hi Ben,

Ben Woodcroft <b.woodcr...@uq.edu.au> skribis:

> Anyway, to move forward I created a repo so that package recipes can
> be modified to use a GCC that has been optimised for a particular
> architecture. I put it out there so that it is more than just a patch
> on this ML, but I'd be happy to incorporate it into Guix proper if
> that is desired.
> https://github.com/wwood/cpu-specific-guix
>
> For instance, to build DIAMOND optimised for sandybridge:
>
> GUILE_LOAD_PATH=/path/to/cpu-specific-guix:$GUILE_LOAD_PATH\ |guix
> build -e '(begin (use-modules (cpu-specific-guix) (gnu packages
> bioinformatics))\ (cpu-specific-package diamond "sandybridge"))'|

That’s a neat hack!

It’s a bit of a sledgehammer, in that we could achieve this without
rebuilding GCC, I think.  For instance, we could create a ‘gcc’ wrapper
that automatically passes “-march=foo” on the command line of the real
‘gcc’, no?

Thanks for sharing!

Ludo’.

Reply via email to