public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gregnietsky at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-55946-4@http.gcc.gnu.org/bugzilla/> (raw)


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


             reply	other threads:[~2013-01-11 20:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 20:02 gregnietsky at gmail dot com [this message]
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

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=bug-55946-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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.
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).