comp.lang.ada
 help / color / mirror / Atom feed
* GNATBind with a GNAT cross‑compiler
@ 2013-04-25  3:07 Yannick Duchêne (Hibou57)
  2013-04-25 10:46 ` Brian Drummond
  0 siblings, 1 reply; 6+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-04-25  3:07 UTC (permalink / raw)


Hi people,

While trying to figure the cause of some weird errors while compiling with  
a GNAT cross‑compiler, I noticed the wrong GPRBind was invoked (not  
matching the target).

I fixed this using

     for Switches ("Ada") use ("--gnatbind_path=/…/<target>-gnatbind");

… in the Builder package of the project file, which can also be made a  
default editing a `*.cgpr` file or one of the files of the GPRConfig  
database.

Then I noticed there is a `<target>-gcc`, and a `<target>-ld`  and so on,  
for each of my targets including the native one, but only a  
`<target>-gnatbind` for non‑native target, and the native one only exist  
as unprefixed.

So I will rename all non‑prefixed GNAT tools to give them a target prefix  
and will remove the default (with all non‑prefix named tools) GNAT  
compiler suite to only have the ones I compiled, so that I will always get  
an error whenever any one of these tools is unfortunately invoked using a  
non‑prefixed name, which is error‑prone as this is likely to not be the  
one for the target.

I don't really have any question, that's just to tell people in case any  
one encounter a similar issue. I still wonder why, as compilation of GCC  
and Binutils generates a prefixed version of all of their tools, why don't  
compilation of GNAT do the same.


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



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

end of thread, other threads:[~2013-04-27  8:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-25  3:07 GNATBind with a GNAT cross‑compiler Yannick Duchêne (Hibou57)
2013-04-25 10:46 ` Brian Drummond
2013-04-26 20:59   ` Yannick Duchêne (Hibou57)
2013-04-26 23:24     ` Yannick Duchêne (Hibou57)
2013-04-27  2:47       ` Yannick Duchêne (Hibou57)
2013-04-27  8:23       ` Brian Drummond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox