public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/55946] New: Wrong GNAT tools used on build of gnattools [native-cross]
@ 2013-01-11 20:02 gregnietsky at gmail dot com
  2013-01-27 19:49 ` [Bug ada/55946] " chris.gccbugzilla at breisch dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gregnietsky at gmail dot com @ 2013-01-11 20:02 UTC (permalink / raw)
  To: gcc-bugs


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)<HOST>-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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-14 10:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-11 20:02 [Bug ada/55946] New: Wrong GNAT tools used on build of gnattools [native-cross] gregnietsky at gmail dot com
2013-01-27 19:49 ` [Bug ada/55946] " chris.gccbugzilla at breisch dot org
2013-11-06 18:17 ` [Bug ada/55946] wrong tools used for " ebotcazou at gcc dot gnu.org
2013-12-11 13:24 ` ebotcazou at gcc dot gnu.org
2013-12-12 22:50 ` ebotcazou at gcc dot gnu.org
2013-12-12 22:53 ` ebotcazou at gcc dot gnu.org
2013-12-12 22:57 ` ebotcazou at gcc dot gnu.org
2014-01-14 10:35 ` ebotcazou at gcc dot gnu.org

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 read-only IMAP folder(s) and NNTP newsgroup(s).