diff mbox series

[bug#47693] : Use 'cc-for-target'.

Message ID 951b5d9f5c46625e1a06fc925454d11678d4e55e.camel@telenet.be
State Accepted
Headers show
Series [bug#47693] : Use 'cc-for-target'. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

M April 10, 2021, 6:03 p.m. UTC
Hi Guix,

This patch series addressed some warnings generated by the linter defined
in #47676.  There will (presumably) be more patches along these lines
later.

These patches do *not* cause any rebuilds (except when cross-compiling),
as (string-append "CC=" (cc-for-target)) evaluates to "CC=gcc" when not
cross-compiling (this is evaluated from within Guix, not from in the build
container, so this doesn't cause a derivation change).

An exception is xssproxy, which needs to be rebuilt, due to nested usage of
quasiquote / unquote.  It can probably be worked-around but I don't think
it's worth it for a single package.

./pre-inst-env guix build guix still succeeds, and the derivation for guix
isn't even changed:

$./pre-inst-env guix weather guix
> computing 1 package derivations for x86_64-linux...
> looking for 1 store items on https://ci.guix.gnu.org...
> https://ci.guix.gnu.org
>   100.0% substitutes available (1 out of 1)
> [...]

Now running "./pre-inst-env guix pull --url=$PWD --profile=tmp-prof --disable-authentication --allow-downgrades --banch=BRANCH";
I'll let you know if this fails.

Greetings,
Maxime

Comments

Tobias Geerinckx-Rice April 21, 2021, 11:40 p.m. UTC | #1
Maxime,

Thanks for this series!

I applied it by downloading from the first top-right ‘Download’ 
link and using ‘git am --patch-format mbox /tmp/47693-0.mbox’.  It 
works to apply all changes, but combines them all into a single 
commit.

If anyone knows how to apply whole mboxes from the archives, as 
separate commits, please let me know.  I'll push it as soon as I 
learn how!

One very minor correction:

> An exception is xssproxy, which needs to be rebuilt,
> due to nested usage ofquasiquote / unquote.

There are two: ‘nethogs’ is the other.

Both are cheap (C <3 U) leaf packages.  I don't think it worth 
working around either.

Kind regards,

T G-R
M April 22, 2021, 4:44 p.m. UTC | #2
Tobias Geerinckx-Rice via Guix-patches via schreef op do 22-04-2021 om 01:40 [+0200]:
> Maxime,
> 
> Thanks for this series!
> 
> I applied it by downloading from the first top-right ‘Download’ 
> link and using ‘git am --patch-format mbox /tmp/47693-0.mbox’.  It 
> works to apply all changes, but combines them all into a single 
> commit.

Can you download each patch separately, say as

  download-dir/0001-first.patch
  download-dir/0001-second.patch
  ...

and run "git am download-dir/*.patch"?
Ideally, "git am --patch-format mbox ..." would ‘just work’ though ...

> If anyone knows how to apply whole mboxes from the archives, as 
> separate commits, please let me know.  I'll push it as soon as I 
> learn how!

Alternatively, you could fetch from my public repo
(branch: cc-for-target, current latest commit: 49ac49daca37f975527f2c2f756f719bd55d47ff,
url: https://notabug.org/mdevos/guix).  (You'll need to rebase and sign the commits
yourself instead of doing a mergo, I am not in .guix-authorizations.)

IIRC, I have not yet sent the latest commits to the latest mailing list though,
and it also contains a separate commit ‘lint: Add 'compiler-for-target' checker.’.

> One very minor correction:
> 
> > An exception is xssproxy, which needs to be rebuilt,
> > due to nested usage ofquasiquote / unquote.
> 
> There are two: ‘nethogs’ is the other.
Ok.

> Both are cheap (C <3 U) leaf packages.  I don't think it worth 
> working around either.
Agreed.

Greetings,
Maxime.
M April 22, 2021, 4:51 p.m. UTC | #3
> Alternatively, you could fetch from my public repo
> (branch: cc-for-target, current latest commit: 49ac49daca37f975527f2c2f756f719bd55d47ff,
> url: https://notabug.org/mdevos/guix).

Oops this should have been
<https://notabug.org/mdevos/guix-gnunet/>.
Mathieu Othacehe July 8, 2021, 2:34 p.m. UTC | #4
Hey,

It appears that this has been pushed, so closing.

Thanks,

Mathieu
diff mbox series

Patch

From 688ac40430952dc34bfb239ddf29da366b74b3bc Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Fri, 9 Apr 2021 21:46:24 +0200
Subject: [PATCH 01/16] gnu: irc: Use 'cc-for-target'.

As replacing "CC=gcc" with ,(string-append "CC=" (cc-for-target))
does not change the derivation, this patch will not cause any
rebuilds, except when cross-compiling (but cross-compiling wass
broken anyway).  Likewise for the other patches in this series.

* gnu/packages/irc.scm (ii, sic)[arguments]<#:make-flags>:
  Use 'cc-for-target'.
---
 gnu/packages/irc.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index 5fba72b576..12f50cc523 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -30,6 +30,7 @@ 
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system glib-or-gtk)
@@ -341,7 +342,7 @@  for the IRCv3 protocol.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags (list (string-append "PREFIX=" %output)
-                          "CC=gcc")
+                          ,(string-append "CC=" (cc-for-target)))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))         ; no configure
@@ -365,7 +366,7 @@  for the IRCv3 protocol.")
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no tests
-       #:make-flags (list "CC=gcc"
+       #:make-flags (list ,(string-append "CC=" (cc-for-target))
                           (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
-- 
2.31.1