From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4139 invoked by alias); 11 Jan 2013 20:02:22 -0000 Received: (qmail 4040 invoked by uid 48); 11 Jan 2013 20:01:59 -0000 From: "gregnietsky at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/55946] New: Wrong GNAT tools used on build of gnattools [native-cross] Date: Fri, 11 Jan 2013 20:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gregnietsky at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg01059.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55946 Bug #: 55946 Summary: Wrong GNAT tools used on build of gnattools [native-cross] Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned@gcc.gnu.org ReportedBy: gregnietsky@gmail.com Created attachment 29151 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29151 Workaround patch sutible for my needs First time ive added GNAT/ADA to the chain i bootstraped 4.8.0 20130107 from ada core i then rebuilt all the cross chains i have for ARM/MIPS/PPC this went fine building native i686 from x86-64 works fine .... trying to build a native aarch64 failed [i did have a native cross compiler in place with aarch64-linux-gnu-gnat.... and did test they work] please note that this is not a solution but a workaround im happy with it requires 1)gnatmake in the path 2)-gnatmake/link/bind/tls [symlinks added to native to allow normal cross] the solution will require changes to autotools IMHO problems ... 1)building xgnatugn is done with aarch64-linux-gnu-gnatmake this is not correct as it needs to use gnatmake on the build system as it executes this program to generate docs the following hunk solves this but is not portable possibly adding BUILD_GNATMAKE is better gcc/ada/gcc-interface/Make-lang.in @@ -621,7 +619,7 @@ ada/doctools/xgnatugn$(build_exeext): ada/xgnatugn.adb -$(MKDIR) ada/doctools $(CP) $^ ada/doctools - cd ada/doctools && $(GNATMAKE) -q xgnatugn + cd ada/doctools && gnatmake -q xgnatugn 2)Wrong libs [native build] are used to build gnattools and the native tools are used setting host = @host_cpu@-@host_os@ prefixing gnat tools with $(host)- -RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib ))) +RTS_DIR:=$(strip $(subst \,/,$(shell $(host)-gnatls -v | grep adalib ))) this seems to work till it bombs out complaining about 3)system.ads pragma Restrictions (No_Implicit_Dynamic_Code); causes failure as others dont honor it removing this allows complteion and succesfull build