Bug 61201 - Cross compile fails with SPARK_05 undefined
Summary: Cross compile fails with SPARK_05 undefined
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-16 16:53 UTC by Richard Henderson
Modified: 2014-05-20 17:58 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Henderson 2014-05-16 16:53:16 UTC
restrict.ads:145:07: "SPARK_05" is undefined (more references follow)
gnatmake: "/home/rth/work/gcc/git-4.9/gcc/ada/ali-util.adb" compilation error
make[3]: *** [gnatmake-re] Error 4
make[3]: Leaving directory `/home/rth/work/gcc/bld-arm/gcc/ada/tools'
make[2]: *** [gnattools-cross] Error 2
make[2]: Leaving directory `/home/rth/work/gcc/bld-arm/gnattools'
make[1]: *** [all-gnattools] Error 2
make[1]: Leaving directory `/home/rth/work/gcc/bld-arm'
make: *** [all] Error 2

While this specific case is x86_64 cross arm, it happens with several
other cross-compilation targets as well.
Comment 1 Arnaud Charlet 2014-05-16 17:03:31 UTC
You need a matching (built with same sources) native first to build a
cross, I suspect that's the issue here.
Comment 2 Richard Henderson 2014-05-19 16:29:29 UTC
While that does allow me to proceed further, I think you're dismissing
an actual problem somewhere.  If gnat 4.8.2 can compile gnat 4.9.0 for
native, then I do not understand why it can't compile 4.9.0 for cross.

It seems like you've got a search path problem somewhere.
Comment 3 Arnaud Charlet 2014-05-19 16:33:13 UTC
The build of GNAT cross is designed to rely on a matching native, to simplify the
set up, so this is really as designed here, and not just a 'search path problem'.

The coupling between the Ada runtime and the Ada compiler is very strong, and trying to support this combination would simply lead to lots of complexity, hence
the choice of not trying to address this combination, as per the documentation.

So: this is as designed and as documented.

Arno
Comment 4 Eric Botcazou 2014-05-20 17:24:19 UTC
> The build of GNAT cross is designed to rely on a matching native, to
> simplify the
> set up, so this is really as designed here, and not just a 'search path
> problem'.

More specifically, the gnattools must be compiled by the same version of the compiler; for native, this doesn't depend on the base compiler, since the compiler is bootstrapped but, for cross, the base compiler must be the same version.
Comment 5 Richard Henderson 2014-05-20 17:58:04 UTC
Ah, now that's a good answer.  Thanks, Eric.