From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id UFrwD3abxWaFMwAAe85BDQ:P1 (envelope-from ) for ; Wed, 21 Aug 2024 07:47:02 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id UFrwD3abxWaFMwAAe85BDQ (envelope-from ) for ; Wed, 21 Aug 2024 09:47:02 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=RPeZMR3x; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724226422; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=SSBauhFfWZJDSJ7VkeQ7/waa1mgQOFFsiPLn1x0/D1c=; b=XBYuKQOmVRXcq0ah9VUC1ZDskQgo+3g4rgac+ln79j47YWLHyWzyVlmna5BkmpSm9Fc1Iy 8YrRe77vyQ3OH2QUusNTjHe4fRrW3EZ9KM6+ny4J4u3ABZrfRkbgPyH2dIauVd0TjlYvIo HX27ois8Q/pTuCO4GUrvRDBaQKX9rUE4q3pPoFe02ZBuQ7yUTIC1yZIKf13XG7k9wuRWox 7varu5ftbOMH1TdqEI+PibFlLlCnJHZN+qdjBqtdA4KEn3NaYNsajZpfSKP9yST29xlqMM EbHkxQV4EuI65VnPHfDCvvFJtWgTvKnosm72i9UBkdbHOyrsNZEGIow8/eGcRw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724226422; a=rsa-sha256; cv=none; b=frTb8WTaPygQNqC1xQJzW+oNJxDDeWDGrwX/ogtfRbCZiQ1mWaJl3fbP5vqlOP01cog+IR Sbs4bmbXAvlaIg0Ely2C+JJaMoWOSOuAUoscbIq6SW72N4iU7xWfIrOtz0+dKKaqmJDG4f 5P4JVhx3vRy6mt8pW9eeAHW0JWgmpwvMPA07iQTt3yWs22lLnyHlV1OaUGEQ2w9irgLoRq k1532cS1RmMaWcDT6/eggMpwnLpehGHXstkSi113FY8HXuKk8n5+9IIppynyKgzyk1+JKk ObyMoReNYKwWARDHESUbQIeA1ViEBtTCD3n+Uqb2oiH+D0lTZtXukt81VJ6nWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=RPeZMR3x; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" 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 ACB25D8CE for ; Wed, 21 Aug 2024 09:47:01 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgg2l-000296-Fd; Wed, 21 Aug 2024 03:46:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sgg2j-00027q-HJ for guix-devel@gnu.org; Wed, 21 Aug 2024 03:46:09 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgg2h-0006MG-JP for guix-devel@gnu.org; Wed, 21 Aug 2024 03:46:09 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a7ac469e4c4so86853566b.0 for ; Wed, 21 Aug 2024 00:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724226366; x=1724831166; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SSBauhFfWZJDSJ7VkeQ7/waa1mgQOFFsiPLn1x0/D1c=; b=RPeZMR3xSOowKq25WJAn/+htgz+/ow7rRJVvJ96T+IuX2gkAPCBoVh9LvFeeAGEFVa 3SttTgFdmWZ+LyEQFezfffw8v5DOuZXjTuueveSqOiwPiToKkxcewRfTFIZMBC9Rtjrn sniL2IIlII9aJYtvsCTBbnef2hUZ1+IJNE2R2+0mqFhJUxHuIJegbyoMTXzk8hy9RXeW od91ud69+mEh6W9AX/M+XF9Ly0oOYQowHncozP4vKJozsWEjmvDv2zONvGAYE/2kD4jh WKFc+Z4u8VzFF+6zpWx5r1egSGmrCUxA7qqo0VKEaZbQFeL28YObJlIed8P5PSdQu5ap Vbjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724226366; x=1724831166; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SSBauhFfWZJDSJ7VkeQ7/waa1mgQOFFsiPLn1x0/D1c=; b=RM2GJcWxYSNJb8U532Le2MiiwSDdh2ymLKHVjk6GYwFSTrkWPU9OjAjurxyNwsW34s oM6uMxxlRPCNLPR8Eq60vPsdltSQoS46duP/5OtXKIdhwnT+TsxcLLg3HEMQhfXVblJ4 U64/R5F/L7bFIldiTJiyT5VxJ7+wlLcTPsEgcsb9B98P6wMsJHUu3AWoljQD3RXrII3D 3un6LKeyxBFu2An55ZmskjczVEiSu/WjGGEZmmZ7hR62W+TPM43Y8Rz5LQktPZKzD1uV n76IYTPQcM+y0/Nm2JkMxKWGEl9EhgAZKd9CJEqiakr4aDMFHZDjDc5E6FpxxdC0v1nC 8Qrw== X-Gm-Message-State: AOJu0YxceuuMSyd1Y9zFZt5FZClvFXF6UaFgEHv4PK9pQG7nwNoVytyp LgD3erBEV65Wfi5UhyL/CRxa3nYGQnWfwlRVrZaaRPaxyMynJpGbLmRB9YfZ2DtzYIzDffGOIuF 61JG5/CLgLg96QED+ePDt5tZedOB5u1Pu X-Google-Smtp-Source: AGHT+IFXxnNYjT6K4yPER31N3aMOHAbRFWyqjMDNQuznNCHKnj161vvzE1H4jwC15kc9q+C9CYCOg2LmgU8HksERyjg= X-Received: by 2002:a17:907:1b96:b0:a7a:c106:365c with SMTP id a640c23a62f3a-a8670183e8emr101439466b.34.1724226365463; Wed, 21 Aug 2024 00:46:05 -0700 (PDT) MIME-Version: 1.0 References: <87jzgbo6hp.fsf@marekpasnikowski.pl> <87h6bel5d0.fsf@marekpasnikowski.pl> <878qwql473.fsf@marekpasnikowski.pl> In-Reply-To: <878qwql473.fsf@marekpasnikowski.pl> From: Sarthak Shah Date: Wed, 21 Aug 2024 13:15:53 +0530 Message-ID: Subject: Re: Global modification of #:make-flags To: =?UTF-8?Q?Marek_Pa=C5=9Bnikowski?= Cc: Guix Devel Content-Type: multipart/alternative; boundary="00000000000006a56e06202cbc56" Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=shahsarthakw@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list 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+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.79 X-Spam-Score: -6.79 X-Migadu-Queue-Id: ACB25D8CE X-Migadu-Scanner: mx11.migadu.com X-TUID: Dm3Q7lp8E6JA --00000000000006a56e06202cbc56 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey Marek, Yep, this is a patch for the repository. I haven't figured out how to programmatically patch it yet either; the original idea was to use time-machine, but it was causing some errors that I wasn't able to debug. Perhaps it's time I give it another shot. As for -Os, check out the GCC optimization flags example in this post: https://blog.lispy.tech/parameterized-packages-the-second-update.html You'll have to then specify this parameter for the packages you want to install, like so: guix install hello --with-parameter=3Dgcc-oflag=3D-Os Back when I was working on it, there were talks about setting up global transforms for Guix, which is how this patch was supposed to be used globally. I am not sure if this feature has been added to Guix yet, but once it is you can then add this transform globally. I have added features that will check if the build system and any other user defined condition matches before applying parameterization. Otherwise, you'll have to add this transform to the packages you need -Os with, which is not very difficult, just a bit cumbersome... Regards, Sarthak. On Wed, Aug 21, 2024, 13:05 Marek Pa=C5=9Bnikowski wrote: > Sarthak Shah writes: > > > Another thing that needs a bit of fixing is that this doesn't work on > > fresh Guix repositories, you need to have built Guix once from a > > repository before applying the patch. > > Hold on. Is this a patch to the guix /repository/, not /package/? That > would explain the patch failure. Now I need to go and learn how to > programmaticaly patch a channel. > > Any pointers on how to globally set the "-Os" CFLAG? > > --00000000000006a56e06202cbc56 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hey Marek,
Yep, this is a patch for the repository. I haven't figured out how to p= rogrammatically patch it yet either; the original idea was to use time-mach= ine, but it was causing some errors that I wasn't able to debug. Perhap= s it's time I give it another shot.

As for -Os, check out the GCC optimization flags example in = this post:

https://blog.lispy.tech/parameterized-packages-th= e-second-update.html

You'll have to then spec= ify this parameter for the packages you want to install, like so:

guix install hello --with-parameter=3Dgcc-oflag=3D-Os

Back when I was working on it, there were talks about setting up glob= al transforms for Guix, which is how this patch was supposed to be used glo= bally. I am not sure if this feature has been added to Guix yet, but once i= t is you can then add this transform globally. I have added features that w= ill check if the build system and any other user defined condition matches = before applying parameterization. Otherwise, you'll have to add this tr= ansform to the packages you need -Os with, which is not very difficult, jus= t a bit cumbersome...


Regards,

=

Sarthak.


On Wed, Aug 21, 2024, 13:05 Marek Pa=C5=9Bnikows= ki <marek@marekpasnikowski.= pl> wrote:
Sarthak Shah <= shahsarthakw@gmail.com> writes:

> Another thing that needs a bit of fixing is that this doesn't work= on
> fresh Guix repositories, you need to have built Guix once from a
> repository before applying the patch.

Hold on.=C2=A0 Is this a patch to the guix /repository/, not /package/?=C2= =A0 That
would explain the patch failure.=C2=A0 Now I need to go and learn how to programmaticaly patch a channel.

Any pointers on how to globally set the "-Os" CFLAG?

--00000000000006a56e06202cbc56--