From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AGc9LixAd2DZcAEAgWs5BA (envelope-from ) for ; Wed, 14 Apr 2021 21:19:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SGUMKCxAd2CqOwAAB5/wlQ (envelope-from ) for ; Wed, 14 Apr 2021 19:19:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B8924FA6B for ; Wed, 14 Apr 2021 21:19:07 +0200 (CEST) Received: from localhost ([::1]:58522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWl2X-0001Fq-7N for larch@yhetil.org; Wed, 14 Apr 2021 15:19:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWl24-0001CG-50 for help-guix@gnu.org; Wed, 14 Apr 2021 15:18:36 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:46940 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWl22-0002lZ-32 for help-guix@gnu.org; Wed, 14 Apr 2021 15:18:35 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1618427908; bh=ejMahycDGl2twtOx8jWC9mLyqoSgVu0cuTv1QZDYBO8=; h=From:To:Subject:In-Reply-To:References:Date; b=golIe9iFMDe7QqfrRkKUOjVN+SJq77ktc0iFLWICJTMfE8P3tsJUx6nmd/uKzHB8r cTvcLtCS/HvvHWm4NFVDDcgNlwAV9AhpxoYcwmkCuGEXoaizqBfle5+tmP/y9CkrF7 oUvSwt+V3BDaXQE6xGpAwjjeFXnGIZ6vvh8xGFxQ= To: Vincent Legoll , Charles Direg , help-guix Subject: Re: How to compile native? In-Reply-To: References: <87v98o90pv.fsf@dismail.de> Date: Wed, 14 Apr 2021 21:18:28 +0200 Message-ID: <87o8eghdyz.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.5, PDS_OTHER_BAD_TLD=1.999, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618427948; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=SuIhsFM5b9PT/QjP4aGtT1X6cRcE9+YEhbZk/Qth+NA=; b=dY2wlsLaq7UWJkUwtSFdZcEXbb4oH3bSCZvQFl9IWZFn+nA47KjVvQBClEczgoB5uez4Fw el5bXFxZhzpEjAnbuu8p1w0vPxdX7DyJUWusgNDEikdR7WDMeqBCaOvQuNseatybJHipcV p+5JwxNAVlRgawEd4kEFBgcbOC4eywrfTohfK/3cbQDi4iUfK2dLz2+jdsUR1Iz6j1J9C+ nTeYUIyUxHc9Sn7aS8czGXf5/YVNNzLrYH0rSh8FVJ8ZBuaaEWbuMxFVL5MUyDUuKH2prf AkndxiZaIGvN0BIID34+pZHlliMjqy7cTH/gU0VEPDSfOXYJcGQEITrQaSZk6g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618427948; a=rsa-sha256; cv=none; b=T59steZcjyL4VXXLSBkhP3m2DNVB24cl8j+ZeahLhsM6kVGa19A9oGIvXv7FfRgdW132HB sv9tq9VjSIM7awVCzPinHSUqmb0YGth/C7UFfYxNmoRt4NHFMtMr2QgquAKI5KYSJwvt+P wpb6i4dgHLLmVw8C3fKEEZj0p7AMXPZzaS4OCh6EUZC8R+xYaBpr3ezsKgr/yMaKsMI6JT tTMhyVnFHLec2vtLqKHypuWIF/cXlQzq5477S0qIXwtyuj5VQ3XqXO+Htg3htbvvRJxIcW MIcXLvLS+7UN9aKDT9QDFZqf1bRSgFYSJDc2AZfdv4LRQL0OuHnJ4WLMzyNdCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=golIe9iF; dmarc=pass (policy=none) header.from=yoctocell.xyz; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=golIe9iF; dmarc=pass (policy=none) header.from=yoctocell.xyz; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: B8924FA6B X-Spam-Score: -2.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: jW6K4KtJvDpU On Wed, Apr 14 2021, Vincent Legoll wrote: >> If you wanted to compile packages with specific compile flags, then >> you'll need to make custom package definitions. > > That's probably what Charles wants, but in a global way, settings > CFLAGS once for the whole distro. The manual mentions the =E2=80=98package-input-rewriting=E2=80=99 procedure= in section =E2=80=9C8.3 Defining Package Variants=E2=80=9D. I guess you could write s= omething like this in a manifest file: --8<---------------cut here---------------start------------->8--- (define custom-package (package (inherit some-package) ...)) =20=20=20=20 (define package-custom-cflags ;; This is a procedure to replace SOME-PACKAGE by CUSTOM-PACKAGE ;; recursively. (package-input-rewriting `((,some-package . ,custom-package)))) (packages->manifest (map package-custom-cflags (list package1 package2 ...))) --8<---------------cut here---------------end--------------->8--- Totally untested though.