From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uGSqODvqcl9uHAAA0tVLHw (envelope-from ) for ; Tue, 29 Sep 2020 08:03:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mJ1tNDvqcl+UOgAAbx9fmQ (envelope-from ) for ; Tue, 29 Sep 2020 08:03:07 +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 725069402A2 for ; Tue, 29 Sep 2020 08:03:07 +0000 (UTC) Received: from localhost ([::1]:41996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNAbK-0001ih-5p for larch@yhetil.org; Tue, 29 Sep 2020 04:03:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNASY-0002QP-TG for guix-patches@gnu.org; Tue, 29 Sep 2020 03:54:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43339) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kNASY-0006O8-Iu for guix-patches@gnu.org; Tue, 29 Sep 2020 03:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kNASY-0003Xp-Ht for guix-patches@gnu.org; Tue, 29 Sep 2020 03:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43679] [PATCH 3/5] gnu: clang-toolchain: Create 'cc' and 'c++' symlinks. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Sep 2020 07:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43679 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Efraim Flashner Cc: 43679@debbugs.gnu.org Received: via spool by 43679-submit@debbugs.gnu.org id=B43679.160136600713581 (code B ref 43679); Tue, 29 Sep 2020 07:54:02 +0000 Received: (at 43679) by debbugs.gnu.org; 29 Sep 2020 07:53:27 +0000 Received: from localhost ([127.0.0.1]:54885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNARz-0003Wz-9N for submit@debbugs.gnu.org; Tue, 29 Sep 2020 03:53:27 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:1509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNARw-0003Wk-W4 for 43679@debbugs.gnu.org; Tue, 29 Sep 2020 03:53:26 -0400 X-IronPort-AV: E=Sophos;i="5.77,317,1596492000"; d="scan'208";a="469988204" Received: from unknown (HELO ribbon) ([193.50.110.247]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 09:53:18 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200928195648.30256-1-ludo@gnu.org> <20200928195648.30256-3-ludo@gnu.org> <20200929054212.GH1386@E5400> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 =?UTF-8?Q?Vend=C3=A9miaire?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 29 Sep 2020 09:53:18 +0200 In-Reply-To: <20200929054212.GH1386@E5400> (Efraim Flashner's message of "Tue, 29 Sep 2020 08:42:12 +0300") Message-ID: <874knh9fyp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -6.0 (------) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: A1wAe87zEeaO Hi Efraim, Efraim Flashner skribis: > On Mon, Sep 28, 2020 at 09:56:46PM +0200, Ludovic Court=C3=A8s wrote: >> From: Ludovic Court=C3=A8s >>=20 >> * gnu/packages/llvm.scm (make-clang-toolchain)[arguments]: Create 'cc' >> and 'c++' symlinks. >> --- >> gnu/packages/llvm.scm | 6 ++++++ >> 1 file changed, 6 insertions(+) >>=20 >> diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm >> index 4b42c4921a..361b39710b 100644 >> --- a/gnu/packages/llvm.scm >> +++ b/gnu/packages/llvm.scm >> @@ -476,6 +476,12 @@ code analysis tools.") >> (((names . directories) ...) >> (union-build out directories))) >>=20=20 >> + ;; Create 'cc' and 'c++' so that one can use it as= a >> + ;; drop-in replacement for the default tool chain = and >> + ;; have configure scripts find the compiler. >> + (symlink "clang" (string-append out "/bin/cc")) >> + (symlink "clang++" (string-append out "/bin/c++")) >> + >> (union-build (assoc-ref %outputs "debug") >> (list (assoc-ref %build-inputs >> "libc-debug"))) >> --=20 >> 2.28.0 > > Isn't this something we've turned down patches for in the past with gcc? That is true, and, ahem, I even know a person who was against it. But! I think it=E2=80=99s a bit different here: (1) we=E2=80=99re only cha= nging =E2=80=98clang-toolchain=E2=80=99, not =E2=80=98clang=E2=80=99, (2) while m= ost build systems look for =E2=80=98gcc=E2=80=99 in addition to =E2=80=98cc=E2=80=99, few of them look= for =E2=80=98clang=E2=80=99. =E2=80=98--with-toolchain=E2=80=99 is useful even if =E2=80=98clang-toolcha= in=E2=80=99 cannot be dropped in (it allows you to try out different GCC versions, for instance), but I think it=E2=80=99s more useful if one can use it to build their code with= a different free tool chain. One use case that comes to mind is portability testing for C/C++ developers. WDYT? Thanks, Ludo=E2=80=99.