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: [email protected]
ReportedBy: [email protected]
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