mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Successfull build of gnat-6.3.0 with musl-cross-make
Date: Sun, 5 Nov 2017 13:01:26 -0500	[thread overview]
Message-ID: <20171105180126.GJ1627@brightrain.aerifal.cx> (raw)
In-Reply-To: <69c03d16-1946-d4e3-f909-2bd2196afe97@in2p3.fr>

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 <termio.h> 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


  reply	other threads:[~2017-11-05 18:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02  9:44 Didier Kryn
2017-11-05 18:01 ` Rich Felker [this message]
2017-11-05 20:35   ` Didier Kryn
2017-11-30 16:30 ` Building musl-cross-make with gnat in musl environement Didier Kryn
2017-11-30 17:06   ` Rich Felker
2017-12-01  7:31     ` Didier Kryn
2017-12-13  9:29     ` Didier Kryn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171105180126.GJ1627@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).