From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12061 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Successfull build of gnat-6.3.0 with musl-cross-make Date: Sun, 5 Nov 2017 13:01:26 -0500 Message-ID: <20171105180126.GJ1627@brightrain.aerifal.cx> References: <69c03d16-1946-d4e3-f909-2bd2196afe97@in2p3.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1509904898 27735 195.159.176.226 (5 Nov 2017 18:01:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 5 Nov 2017 18:01:38 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12077-gllmg-musl=m.gmane.org@lists.openwall.com Sun Nov 05 19:01:34 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1eBPEk-00077E-M5 for gllmg-musl@m.gmane.org; Sun, 05 Nov 2017 19:01:34 +0100 Original-Received: (qmail 28213 invoked by uid 550); 5 Nov 2017 18:01:38 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 28185 invoked from network); 5 Nov 2017 18:01:38 -0000 Content-Disposition: inline In-Reply-To: <69c03d16-1946-d4e3-f909-2bd2196afe97@in2p3.fr> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12061 Archived-At: On Thu, Nov 02, 2017 at 10:44:13AM +0100, Didier Kryn wrote: > I report the successfull build of the cross-compiler > x86_64-musl-gcc-6.3.0 - understanding Ada - on x86_64 Debian Wheezy. > > The toolchain for build was gcc-6.3.0 for Linux-Gnu provided by > Adacore.The build toolchain to build major version 6 must be at > least major version 5. > > Of course, the language option must be '--enable-languages=ada,c,c++' . This is very interesting! Thanks for the report. As an aside, I know there's been some interest in building GHDL, which depends on GNU Ada; I'm not sure if this gets us closer to making that work but I suspect it might. > Three patches were necessary: > gnat63-terminals.diff: removes a #include in a C > source file. > gnat63-prj-attr.diff: corrects the layout of a record in an > Ada source file to prevent a warning concerning performance. > gnat63-xr_tabls.diff: same as the previous. Are the second and third actually necessary, and are they related to musl at all? If they're actual improvement regardless of libc, they should probably go upstream in gcc. But if they're needed for now to make mcm work with ada out of the box, I don't mind including them in mcm as a convenience. > Note on static linking: > Compilation of Ada program is often made in one invocation of > gnatmake, which calls gcc, gnatbind and gnatlink. By default, > gnatmake links everything statically, except the libc (probably a > gnuism). If the option -shared is given, then it links everything > dynamically. The option -static is ignored by gnatmake. > However, it is possible to produce static executables by > invoking gcc -c, gnatbind, andgnatlink, because gnatlink honours the > -static option. > > I attach the patches in case someone is interested. > > I was able to compile a native x86_64-pc-linux-musl-gcc-6.3.0 > (with the 3 steps) using this cross-compiler for build. Seems there's no reason not to static link libc if everything else is static too, except for glibc issues with static linking. It might make sense to change the default for musl target tuples. Rich