From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Optionally using more advanced CPU features Date: Mon, 21 Aug 2017 14:23:23 +0200 Message-ID: <87inhhw1ms.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djljv-0006CW-Qa for guix-devel@gnu.org; Mon, 21 Aug 2017 08:23:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djljt-0003zF-2u for guix-devel@gnu.org; Mon, 21 Aug 2017 08:23:31 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21031) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1djljs-0003yp-Qs for guix-devel@gnu.org; Mon, 21 Aug 2017 08:23:29 -0400 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: guix-devel Hi Guix, I was wondering how we should go about optionally building software for more advanced CPU features. Currently, we build software for the lowest common feature set among x86_64 CPUs. That’s good for portability, but not so good for performance. Enabling CPU features often happens through configure flags, but expressing support at that level in our package definitions seems bad. How can we make it possible for users to build their software for different CPUs? We can cross-compile for other architectures on the command line with “--target” and “--system”; can we allow for compilation with special CPU features across the graph with “--features”? Build system abstractions or package definitions would then be changed to recognize these features and modify the corresponding flags as needed. If we had a larger build farm we could also offer substitutes for more modern CPUs. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net