From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: MinGW cross-compilation support Date: Wed, 07 Dec 2016 22:34:07 +0100 Message-ID: <878trr8lv4.fsf@gnu.org> References: <20160818060851.2853-1-janneke@gnu.org> <20160818060851.2853-11-janneke@gnu.org> <87wpfc9j3d.fsf_-_@gnu.org> <2de6f72c-1e73-50b5-a87a-a2bd12485cbc@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEjr1-0003Eq-At for guix-devel@gnu.org; Wed, 07 Dec 2016 16:34:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEjr0-0003Aq-EW for guix-devel@gnu.org; Wed, 07 Dec 2016 16:34:19 -0500 In-Reply-To: <2de6f72c-1e73-50b5-a87a-a2bd12485cbc@gmail.com> (Manolis Ragkousis's message of "Wed, 7 Dec 2016 12:53:05 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Manolis Ragkousis Cc: guix-devel@gnu.org Hey! Manolis Ragkousis skribis: > On 12/07/16 11:36, Ludovic Court=C3=A8s wrote: [...] >> Adding a new cross-compilation target is a commitment. So I hope you >> and others will make sure it remains functional and useful! >>=20 >> I also think that together with Manolis and everyone else who=E2=80=99s = played >> with cross-compilation, we must clean up the mess that this has become. >> ;-) Namely, we must more clearly separate target-specific things and >> also separate build-side from host-side code (in cross-base.scm). > > You are right, now and then cross-compilation breaks with no apparent > reason as the code gets bigger and more complex (especially after adding > non-Linux targets). > > I was thinking that maybe we need to abstract and remove all the target > specific from cross-base.scm into new files. I haven't thought about the > actual implementation yet, but it could be something like what I did > with (cross-kernel-headers ...), which simplifies how (cross-libc ...) > chooses which headers to use. > > Everyone please share any ideas you have :-) I moved code that relates to phases to a new (gnu build cross-toolchain) module in commit 3593e5d5c50b08cf69739aac98cd7c89247fa6da. We could probably do the same configure flags and make flags. Going further I was thinking we could have an abstract representation of =E2=80=9Cplatform=E2=80=9D to cater to GNU/Linux (including on ARM), GNU/Hu= rd, and maybe MinGW, say: ;; Description of a platform supported by the GNU system. (define-record-type* platform make-platform platform? (triplet platform-triplet) ;"x86_64-linux-gnu" (system-type platform-system-type) ;"x86_64-linux" (linux-architecture platform-linux-architecture) ;"amd64" (kernel platform-kernel) ; (ld.so platform-ld.so) ;"ld-linux-x86-64.so.2" (gcc platform-gcc) ; (binutils platform-binutils) ; (libc platform-libc)) ; Probably this should include cross-compilation hints somehow. Ideally it should be something like =E2=80=9Csysdeps=E2=80=9D in glibc: a m= echanism that allows us to separate platform-specific code from generic code. Ludo=E2=80=99.