From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 9LtHHgEddGDjEQAAgWs5BA (envelope-from ) for ; Mon, 12 Apr 2021 12:12:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WHVhFwEddGA5NQAAB5/wlQ (envelope-from ) for ; Mon, 12 Apr 2021 10:12:17 +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 87EC51D9DB for ; Mon, 12 Apr 2021 11:48:12 +0200 (CEST) Received: from localhost ([::1]:52320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVtAv-0003cz-V6 for larch@yhetil.org; Mon, 12 Apr 2021 05:48:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVtAn-0003cc-UB for bug-guix@gnu.org; Mon, 12 Apr 2021 05:48:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44999) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVtAn-0007D7-NH for bug-guix@gnu.org; Mon, 12 Apr 2021 05:48:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lVtAn-0005kf-KA for bug-guix@gnu.org; Mon, 12 Apr 2021 05:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47648: cc-for-target makes --with-c-toolchain unusable for some packages Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 12 Apr 2021 09:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47648 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: raingloom , 47648@debbugs.gnu.org Received: via spool by 47648-submit@debbugs.gnu.org id=B47648.161822086322084 (code B ref 47648); Mon, 12 Apr 2021 09:48:01 +0000 Received: (at 47648) by debbugs.gnu.org; 12 Apr 2021 09:47:43 +0000 Received: from localhost ([127.0.0.1]:56545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVtAV-0005k7-AF for submit@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 ) id 1lVtAS-0005jx-98 for 47648@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@telenet.be> From: Maxime Devos Date: Mon, 12 Apr 2021 11:47:31 +0200 In-Reply-To: <20210408023329.4e6d48d7@riseup.net> References: <20210408023329.4e6d48d7@riseup.net> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618220892; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=aWMwYXKuhmBbNdqLYSQzJR+LnGZ4cLcVrL5E14ZD82Q=; b=uN0pBtOFfiZU4LWxsjhEFq0L8rJikpxk0HGLJocXXGzcUcq6SFDAjzGDalNzuNMFucqCdw jtc4lUcSd2s3rfNL/seGo1KKgQwp+jLeaifaDPHTM4vtwgpJuNYpP5+91hGN9R9bVv15SN VKJg0TTlfKE+Q9AFUh2QYiccZroT9SMKIG8uNoedPWzqFKqkSOq2YWotj8dj3WDiCIzbTL 7wFPQuppEDes+sDaSPLfPcG5rguYzhgNNvPlGZaAPvCbCIuPdCcDSD2wuXC0STx6Dt0yHy ESFpkOoMjZou8RfzLfcP/BhMbIJz6YxgKbIIqqJN8Xdce+ryxFH/SoIeWIbi7A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618220892; a=rsa-sha256; cv=none; b=QcQ6avngI6TZSIxJjfOTSce64S/yVxr3axFG3/mQwS5hXntICzZCvd1DBHAiE0faiQofz8 EULtHNAaqYZun7HY20Bx5uCrNjSIE2G2rFxTR9QLMSTi9dIN+jHdbgH02HRB22x97FIE4q haB56rE5lQ5j2FOUXBMzCRqg/9xVgfY1+gvDR2X9gAac4MiCeX2z64yinoRMwUglzh4JMz TTwuEIHwKxnFIlZLK62nZqrMnZP0MmbDDCoMfEWMRJ5lV/RgfHxcaIWah0Zv7nOnNsHj3b G8OrEKpK/3cfcRCFnRNLsG3gK/3EzVcB/6dHs2nCpkzyzzCxh2sQmqcwSRHAeg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=eg54MxnY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.44 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=eg54MxnY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 87EC51D9DB X-Spam-Score: -3.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: DzSH5kTyXDv9 --=-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--