From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12059 Path: news.gmane.org!.POSTED!not-for-mail From: Didier Kryn Newsgroups: gmane.linux.lib.musl.general Subject: Successfull build of gnat-6.3.0 with musl-cross-make Date: Thu, 2 Nov 2017 10:44:13 +0100 Message-ID: <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: multipart/mixed; boundary="------------5DD2139CC95D3CB1E48FCBCE" X-Trace: blaine.gmane.org 1509615884 30054 195.159.176.226 (2 Nov 2017 09:44:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Nov 2017 09:44:44 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: musl@lists.openwall.com Original-X-From: musl-return-12073-gllmg-musl=m.gmane.org@lists.openwall.com Thu Nov 02 10:44:37 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 1eAC33-0006fo-Pv for gllmg-musl@m.gmane.org; Thu, 02 Nov 2017 10:44:29 +0100 Original-Received: (qmail 3773 invoked by uid 550); 2 Nov 2017 09:44:32 -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 3711 invoked from network); 2 Nov 2017 09:44:31 -0000 X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at cczrelay02 Xref: news.gmane.org gmane.linux.lib.musl.general:12059 Archived-At: This is a multi-part message in MIME format. --------------5DD2139CC95D3CB1E48FCBCE Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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++' . 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. 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. Didier --------------5DD2139CC95D3CB1E48FCBCE Content-Type: text/x-patch; name="gnat63-terminals.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gnat63-terminals.diff" diff -rupN gcc-6.3.0-A/gcc/ada/terminals.c gcc-6.3.0-B/gcc/ada/terminals.c --- gcc-6.3.0-A/gcc/ada/terminals.c 2016-02-12 00:53:54.000000000 +0100 +++ gcc-6.3.0-B/gcc/ada/terminals.c 2017-10-13 08:17:35.000000000 +0200 @@ -1068,12 +1068,6 @@ __gnat_setup_winsize (void *desc, int ro #include #include -/* On some system termio is either absent or including it will disable termios - (HP-UX) */ -#if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \ - && !defined (__rtems__) -# include -#endif #include #include --------------5DD2139CC95D3CB1E48FCBCE Content-Type: text/x-patch; name="gnat63-prj-attr.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gnat63-prj-attr.diff" diff -rupN gcc-6.3.0-A/gcc/ada/prj-attr.ads gcc-6.3.0-B/gcc/ada/prj-attr.ads --- gcc-6.3.0-A/gcc/ada/prj-attr.ads 2014-08-04 11:55:01.000000000 +0200 +++ gcc-6.3.0-B/gcc/ada/prj-attr.ads 2017-11-01 20:31:11.000000000 +0100 @@ -86,9 +86,6 @@ package Prj.Attr is Positive range 1 .. Max_Attribute_Name_Length; type Attribute_Data (Name_Length : Attribute_Name_Length := 1) is record - Name : String (1 .. Name_Length); - -- The name of the attribute - Attr_Kind : Defined_Attribute_Kind; -- The type of the attribute @@ -111,6 +108,8 @@ package Prj.Attr is -- The value of the attribute when referenced if the attribute has not -- yet been declared. + Name : String (1 .. Name_Length); + -- The name of the attribute end record; -- Name and characteristics of an attribute in a package registered -- explicitly with Register_New_Package (see below). --------------5DD2139CC95D3CB1E48FCBCE Content-Type: text/x-patch; name="gnat63-xr_tabls.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gnat63-xr_tabls.diff" diff -rupN gcc-6.3.0-A/gcc/ada/xr_tabls.ads gcc-6.3.0-B/gcc/ada/xr_tabls.ads --- gcc-6.3.0-A/gcc/ada/xr_tabls.ads 2014-08-01 11:38:48.000000000 +0200 +++ gcc-6.3.0-B/gcc/ada/xr_tabls.ads 2017-10-13 08:50:24.000000000 +0200 @@ -292,12 +292,11 @@ package Xr_Tabls is private type Project_File (Src_Dir_Length, Obj_Dir_Length : Natural) is record - Src_Dir : String (1 .. Src_Dir_Length); Src_Dir_Index : Integer; - - Obj_Dir : String (1 .. Obj_Dir_Length); Obj_Dir_Index : Integer; Last_Obj_Dir_Start : Natural; + Src_Dir : String (1 .. Src_Dir_Length); + Obj_Dir : String (1 .. Obj_Dir_Length); end record; type Project_File_Ptr is access all Project_File; @@ -364,7 +363,6 @@ private type Declaration_Record (Symbol_Length : Natural) is record Key : Cst_String_Access; - Symbol : String (1 .. Symbol_Length); Decl : Reference; Is_Parameter : Boolean := False; -- True if entity is subprog param Decl_Type : Character; @@ -374,6 +372,7 @@ private Match : Boolean := False; Par_Symbol : Declaration_Reference := null; Next : Declaration_Reference := null; + Symbol : String (1 .. Symbol_Length); end record; -- The lists of referenced (Body_Ref, Ref_Ref and Modif_Ref) are -- kept unsorted until the results needs to be printed. This saves --------------5DD2139CC95D3CB1E48FCBCE--