GNU bug report logs - #47648
cc-for-target makes --with-c-toolchain unusable for some packages

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Severity: important; Reported by: raingloom <raingloom@HIDDEN>; dated Thu, 8 Apr 2021 00:41:02 UTC; Maintainer for guix is bug-guix@HIDDEN.
Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 47648 <at> debbugs.gnu.org:


Received: (at 47648) by debbugs.gnu.org; 12 Apr 2021 09:47:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 12 05:47:43 2021
Received: from localhost ([127.0.0.1]:56545 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lVtAV-0005k7-AF
	for submit <at> debbugs.gnu.org; Mon, 12 Apr 2021 05:47:43 -0400
Received: from andre.telenet-ops.be ([195.130.132.53]:40728)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1lVtAS-0005jx-98
 for 47648 <at> debbugs.gnu.org; Mon, 12 Apr 2021 05:47:41 -0400
Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d])
 by andre.telenet-ops.be with bizsmtp
 id rlnc240080mfAB401lncFx; Mon, 12 Apr 2021 11:47:38 +0200
Message-ID: <0139952bd05c10e068ce564d7982a90b032d9874.camel@HIDDEN>
Subject: Re: bug#47648: cc-for-target makes --with-c-toolchain unusable for
 some packages
From: Maxime Devos <maximedevos@HIDDEN>
To: raingloom <raingloom@HIDDEN>, 47648 <at> debbugs.gnu.org
Date: Mon, 12 Apr 2021 11:47:31 +0200
In-Reply-To: <20210408023329.4e6d48d7@HIDDEN>
References: <20210408023329.4e6d48d7@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-JAaFV4kjFytY930Iv4oR"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1618220858; bh=aWMwYXKuhmBbNdqLYSQzJR+LnGZ4cLcVrL5E14ZD82Q=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=eg54MxnYXf9QRPIV0PRAM4klyq6ADulQbJQl7IVTDVZlvuU05bhwlMPXAcvZau2OR
 Jty+0VVo7b3ns66XOxFY5KHcAvQlDdJkEvP9VC9I47CXeKwMli0rpGbUL+o5tN+5dI
 W9cex/m4ewL+Kxsv20Fz04UHxA1gCIzc7FzyzPir0kI7+4k5WGnhFy1/HNfv7Sfkpq
 QnfQJ3PTtzwsft4UWaZ6X230msDAVLD3PjUQY2qu+W9nOY5ZyVM9AypgHfh4dqptdE
 kBCtt6k1gOZwULayGX0DNuifqh2C4H5Y7PG3w8IsmzykhNcyfSd2Mlnu2Xx8hHhGpM
 vdITnuv0Lq5oQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47648
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--=-JAaFV4kjFytY930Iv4oR
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, 2021-04-08 at 02:33 +0200, raingloom wrote:
> I tried compiling lua with clang on a whim and found out about
> cc-for-target. Not sure if that's the only instance of hardcoded gcc,
> but it's certainly a prominent one.

A little more information:
this is not specific to cc-for-target.  Try searching for "CC=3Dgcc".

Most uses of "CC=3Dgcc" are incorrect when cross-compiling.  When
cross-compiling, these should be "CC=3DARCHITECTURE-linux-gnu-gcc" or
something like that.  The "cc-for-target" procedure outputs the correct
string.

> What would be the idiomatic way to fix it? Detect clang dynamically? Or
> move cc-for-target inside the build system module and make it available
> at build time?

To avoid massive rebuilds, perhaps the procedure "cc-for-target" could be
replaced with a macro "cc-for-target" that accesses the native-inputs of
this-package to determine whether it should output "CC=3Dgcc" /
"CC=3DARCHITECTURE-linux-gnu-gcc" or "CC=3Dclang" / "CC=3DARCHITECTURE-linu=
x-gnu-clang"?

Also, moving cc-for-taget to the build system module would require changing
existing package definitions:
  ,(string-append "CC=3D" (cc-for-target)) --> (string-append "CC=3D" (cc-f=
or-target))
  (string-append "CC=3D" ,(cc-for-target)) --> (string-append "CC=3D" (cc-f=
or-targt))

Warning: I haven't tested whether this approach works with --with-c-toolcha=
in.

Greetings,
Maxime.

--=-JAaFV4kjFytY930Iv4oR
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHQXMxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7s68AQDlXiFzoni85L2OIBV6pvSinJsn
asEjNqbqtXvBGsLVZQEA5rFY5J7LfSVK+abmzqU+lJ7LBi23hso42y6C/JTLSAM=
=CghC
-----END PGP SIGNATURE-----

--=-JAaFV4kjFytY930Iv4oR--





Information forwarded to bug-guix@HIDDEN:
bug#47648; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Apr 2021 00:40:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 07 20:40:38 2021
Received: from localhost ([127.0.0.1]:45534 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lUIis-0002qT-2s
	for submit <at> debbugs.gnu.org; Wed, 07 Apr 2021 20:40:38 -0400
Received: from lists.gnu.org ([209.51.188.17]:35006)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raingloom@HIDDEN>) id 1lUIiq-0002qM-Pc
 for submit <at> debbugs.gnu.org; Wed, 07 Apr 2021 20:40:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50604)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <raingloom@HIDDEN>)
 id 1lUIiq-000480-Ga
 for bug-guix@HIDDEN; Wed, 07 Apr 2021 20:40:36 -0400
Received: from mx1.riseup.net ([198.252.153.129]:54678)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <raingloom@HIDDEN>)
 id 1lUIio-0003KP-Co
 for bug-guix@HIDDEN; Wed, 07 Apr 2021 20:40:35 -0400
Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "*.riseup.net",
 Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified))
 by mx1.riseup.net (Postfix) with ESMTPS id 4FG2VR6S65zDr4s
 for <bug-guix@HIDDEN>; Wed,  7 Apr 2021 17:40:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak;
 t=1617842431; bh=MyEY0XO6JKCRfHVJ530kRzsBr6qlz3qwcJLL+1mcisg=;
 h=Date:From:To:Subject:From;
 b=CvfqVwor5Nf6kh1rZD9Iynwo4CrAPKtg8FFYlvsC8RKgkAMQUo+mvpMD1syFruQW8
 2WIJjyuvKe+YuWTvtuHuvdnmP2IikfgDSizVWtsuSuitNMhoc5sgTh1swIbdjbjyJr
 2oXvJo/CUaT1LA2zM41YtHE49K6zgaluCWWnNMz0=
X-Riseup-User-ID: D128C5592CB118ECA8FE5A1FFBDF68EDEC82F8C7D376184295A89EE018AE4EFE
Received: from [127.0.0.1] (localhost [127.0.0.1])
 by fews1.riseup.net (Postfix) with ESMTPSA id 4FG2VR116hz5w4s
 for <bug-guix@HIDDEN>; Wed,  7 Apr 2021 17:40:30 -0700 (PDT)
Date: Thu, 8 Apr 2021 02:33:29 +0200
From: raingloom <raingloom@HIDDEN>
To: Guix Bugs <bug-guix@HIDDEN>
Subject: cc-for-target makes --with-c-toolchain unusable for some packages
Message-ID: <20210408023329.4e6d48d7@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=198.252.153.129;
 envelope-from=raingloom@HIDDEN; helo=mx1.riseup.net
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

I tried compiling lua with clang on a whim and found out about
cc-for-target. Not sure if that's the only instance of hardcoded gcc,
but it's certainly a prominent one.

What would be the idiomatic way to fix it? Detect clang dynamically? Or
move cc-for-target inside the build system module and make it available
at build time?




Acknowledgement sent to raingloom <raingloom@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#47648; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 16 Apr 2021 16:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.