From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Optionally using more advanced CPU features Date: Mon, 04 Sep 2017 16:50:25 +0200 Message-ID: <87r2vmy0um.fsf@gnu.org> References: <87inhhw1ms.fsf@elephly.net> <19eb4906-44d1-723b-94ba-9ab86dfbedf5@uq.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dosis-0005cZ-1g for guix-devel@gnu.org; Mon, 04 Sep 2017 10:52:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doshn-0007Pu-QZ for guix-devel@gnu.org; Mon, 04 Sep 2017 10:51:33 -0400 In-Reply-To: <19eb4906-44d1-723b-94ba-9ab86dfbedf5@uq.edu.au> (Ben Woodcroft's message of "Sat, 26 Aug 2017 11:39:41 +0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ben Woodcroft Cc: guix-devel Hi Ben, Ben Woodcroft 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=3D/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=E2=80=99s a neat hack! It=E2=80=99s a bit of a sledgehammer, in that we could achieve this without rebuilding GCC, I think. For instance, we could create a =E2=80=98gcc=E2= =80=99 wrapper that automatically passes =E2=80=9C-march=3Dfoo=E2=80=9D on the command lin= e of the real =E2=80=98gcc=E2=80=99, no? Thanks for sharing! Ludo=E2=80=99.