From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2vEL-0000op-Np for guix-patches@gnu.org; Fri, 13 Oct 2017 04:22:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2vEI-00016H-Hx for guix-patches@gnu.org; Fri, 13 Oct 2017 04:22:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56353) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2vEI-000168-EE for guix-patches@gnu.org; Fri, 13 Oct 2017 04:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e2vEI-0006G3-4v for guix-patches@gnu.org; Fri, 13 Oct 2017 04:22:02 -0400 Subject: [bug#27344] [PATCH v3 6/8] gnu: Add freehdl. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87lglnery8.fsf@foradis.org> <20170909175752.8566-1-theodoros@foradis.org> <20170909175752.8566-6-theodoros@foradis.org> <87sheqcd0w.fsf@gnu.org> <87lgkggv59.fsf@openmailbox.org> Date: Fri, 13 Oct 2017 10:21:47 +0200 In-Reply-To: <87lgkggv59.fsf@openmailbox.org> (Theodoros Foradis's message of "Thu, 12 Oct 2017 20:00:57 +0300") Message-ID: <878tgfsbj8.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Theodoros Foradis Cc: 27344@debbugs.gnu.org Theodoros Foradis skribis: > Ludovic Court=C3=A8s writes: > >> Theodoros Foradis skribis: >> >>> * gnu/packages/engineering.scm (freehdl): New variable. >> >> I=E2=80=99ve applied the patch. \o/ >> >> I have one question for which I couldn=E2=80=99t find an answer in the p= revious >> discussions: >> >>> + (add-after 'configure 'patch-freehdl-pc >>> + (lambda* (#:key inputs #:allow-other-keys) >>> + (substitute* "freehdl.pc" >>> + (("=3Dg\\+\\+") >>> + (string-append "=3D" (assoc-ref inputs "gcc") >>> + "/bin/g++")) >>> + (("=3Dlibtool") >>> + (string-append "=3D" (assoc-ref inputs "libtool") >>> + "/bin/libtool"))) >>> + #t)) >> >> The effect of this is to retain a reference to GCC, Libtool, and all >> their dependencies, which makes the closure of FreeHDL much bigger. >> >> We could avoid it by just putting this in =E2=80=98freehdl.pc=E2=80=99: >> >> cxx=3Dg++ >> libtool=3Dlibtool >> >> Now, whether this will work depends on whether/how users of =E2=80=98fre= ehdl.pc=E2=80=99 >> use these variables. >> >> Could you check whether that would work? > > Yes, I have tested this and it should work. Freehdl is a VHDL to C > compiler, so the user should be responsible for having a gcc toolchain > in his environment to run the simulations. Just to be clear: does FreeHDL invoke the C compiler by itself, or is it up to the user to compile the C code produced by FreeHDL? In the former case, FreeHDL should definitely keep a reference to the C compiler; otherwise it wouldn=E2=80=99t work out-of-the-box. In the latter case, it doesn=E2=80=99t have to keep a reference to the C compiler. > We can remove this phase (patch-freehdl-pc) altogether. Shall I submit > this patch? I can do it on your behalf if you confirm that it=E2=80=99s FreeHDL does not invoke the C compiler directly. Thank you! Ludo=E2=80=99.