comp.lang.ada
 help / color / mirror / Atom feed
* MinGW GNAT and GCC specs strings
@ 2009-05-27  5:02 Hibou57 (Yannick Duchêne)
  2009-05-27  6:36 ` Hibou57 (Yannick Duchêne)
  0 siblings, 1 reply; 7+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2009-05-27  5:02 UTC (permalink / raw)


Hello all of you,

I've builded a custom MinGW environnemen. I've tried it on a C file :
Ok. Then I've tried it on an Ada file : Failed. gnat1 failed to find
system.ads. So I attempted to pass an "-Imydir" option to gnat1 adding
a "*gnat1: -Imydir." specs string in the GCC specs file, but it does
not seems to work. As a check, if I invok "gcc -v -c test.adb", then I
can see that the arguments I want to pass to gnat1 via the GCC specs
file is not given to the gnat1 command line. So I suppose GCC does not
know the gnat1 specs string (although is perfectly knows the cc1 specs
string).

Is it possible to pass the "-Imydir" command line option to gnat1
using the GCC specs file ?

Or is there another way, without using environnement variables, to
tell gnat1 where Ada includes and libs are located ?

Have a nice day



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

* Re: MinGW GNAT and GCC specs strings
  2009-05-27  5:02 MinGW GNAT and GCC specs strings Hibou57 (Yannick Duchêne)
@ 2009-05-27  6:36 ` Hibou57 (Yannick Duchêne)
  2009-05-27  7:27   ` Hibou57 (Yannick Duchêne)
  0 siblings, 1 reply; 7+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2009-05-27  6:36 UTC (permalink / raw)


I've just remember there are "lang-specs.h" files in each gcc/
<language> subdirectory.

The one for Ada language contains :

--
-----------------------------------------------------------------------

/* This is the contribution to the `default_compilers' array in gcc.c
for
   GNAT.  */

  {".ads", "@ada", 0, 0, 0},
  {".adb", "@ada", 0, 0, 0},
  {"@ada",
   "\
 %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are
incompatible}}\
 %{!S:%{!c:%e-c or -S required for Ada}}\
 gnat1 %{I*} %{k8:-gnatk8} %{w:-gnatws} %{!Q:-quiet} %{nostdinc*}\
    %{nostdlib*}\
    -dumpbase %{.adb:%b.adb}%{.ads:%b.ads}%{!.adb:%{!.ads:%b.ada}}\
    %{O*} %{W*} %{w} %{p} %{pg:-p} %{a} %{f*} %{d*} %{g*&m*} %1\
    %{!S:%{o*:%w%*-gnatO}} \
    %i %{S:%W{o*}%{!o*:-o %b.s}} \
    %{gnatc*|gnats*: -o %j} %{-param*} \
    %{!gnatc*:%{!gnats*:%(invoke_as)}}", 0, 0, 0},

--
-----------------------------------------------------------------------

I gonna use it as a pattern and try to play with it.



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

* Re: MinGW GNAT and GCC specs strings
  2009-05-27  6:36 ` Hibou57 (Yannick Duchêne)
@ 2009-05-27  7:27   ` Hibou57 (Yannick Duchêne)
  2009-05-27 15:13     ` anhvofrcaus
  0 siblings, 1 reply; 7+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2009-05-27  7:27 UTC (permalink / raw)


This only works for "gcc -S|-c source.adb" and not for "gnat compile|
bind|link|make source"

I will fallback to environnement variables, but if someone know a way
to do this, I'm still interested in it



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

* Re: MinGW GNAT and GCC specs strings
  2009-05-27  7:27   ` Hibou57 (Yannick Duchêne)
@ 2009-05-27 15:13     ` anhvofrcaus
  2009-06-04  5:03       ` Hibou57 (Yannick Duchêne)
  0 siblings, 1 reply; 7+ messages in thread
From: anhvofrcaus @ 2009-05-27 15:13 UTC (permalink / raw)


On May 27, 12:27 am, Hibou57 (Yannick Duchêne)
<yannick_duch...@yahoo.fr> wrote:
> This only works for "gcc -S|-c source.adb" and not for "gnat compile|
> bind|link|make source"
>
> I will fallback to environnement variables, but if someone know a way
> to do this, I'm still interested in it

You may have more than one GNAT on your machine. Is there a GNAT
running on Window? If not, I would reinstall GNAT on MinGW.

Anh Vo



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

* Re: MinGW GNAT and GCC specs strings
  2009-05-27 15:13     ` anhvofrcaus
@ 2009-06-04  5:03       ` Hibou57 (Yannick Duchêne)
  2009-06-04 15:20         ` anhvofrcaus
  0 siblings, 1 reply; 7+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2009-06-04  5:03 UTC (permalink / raw)


On 27 mai, 17:13, anhvofrc...@gmail.com wrote:
> You may have more than one GNAT on your machine. Is there a GNAT
> running on Window? If not, I would reinstall GNAT on MinGW.
>
> Anh Vo

Hello Anh

This is for a special build I've made. The GCC compiler is built with
no support of the Windows registry, and I attempt as much as I can, to
make a relocatable installation which only relies on the path inside
of its own installation directory.

Looking at the GNAT code in MinGW sources, I've found about
"ada_source_path" and "ada_object_path", which are two files intended
to tell GNAT where object and source of the standard Ada package are
located. But I still have some problem with it.



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

* Re: MinGW GNAT and GCC specs strings
  2009-06-04  5:03       ` Hibou57 (Yannick Duchêne)
@ 2009-06-04 15:20         ` anhvofrcaus
  2009-06-04 15:58           ` Hibou57 (Yannick Duchêne)
  0 siblings, 1 reply; 7+ messages in thread
From: anhvofrcaus @ 2009-06-04 15:20 UTC (permalink / raw)


On Jun 3, 10:03 pm, Hibou57 (Yannick Duchêne)
<yannick_duch...@yahoo.fr> wrote:
> On 27 mai, 17:13, anhvofrc...@gmail.com wrote:
>
[...]
>
> Looking at the GNAT code in MinGW sources, I've found about
> "ada_source_path" and "ada_object_path", which are two files intended
> to tell GNAT where object and source of the standard Ada package are
> located. But I still have some problem with it.

Actually, only path to bin directory is need for GNAT running on
MinGW. Assuming MinGW is at C:\MinGW, the path=C:\MinGW\bin is
sufficient to run GNAT.

Anh Vo



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

* Re: MinGW GNAT and GCC specs strings
  2009-06-04 15:20         ` anhvofrcaus
@ 2009-06-04 15:58           ` Hibou57 (Yannick Duchêne)
  0 siblings, 0 replies; 7+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2009-06-04 15:58 UTC (permalink / raw)


On 4 juin, 17:20, anhvofrc...@gmail.com wrote:
> Actually, only path to bin directory is need for GNAT running on
> MinGW. Assuming MinGW is at C:\MinGW, the path=C:\MinGW\bin is
> sufficient to run GNAT.
>
> Anh Vo

You sees to know about the subject : do you know if the GNAT compiler
which comes with GPS made some use of the registry ? If it is, perhaps
the compiler I've build, which is another one, is disturbed by some
configuration stored in the registry. But I've ran "configure" so that
the windows registry should normally not be used.

It's on stand-by at the time. Il will tell more later after some
further attempts.



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

end of thread, other threads:[~2009-06-04 15:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-27  5:02 MinGW GNAT and GCC specs strings Hibou57 (Yannick Duchêne)
2009-05-27  6:36 ` Hibou57 (Yannick Duchêne)
2009-05-27  7:27   ` Hibou57 (Yannick Duchêne)
2009-05-27 15:13     ` anhvofrcaus
2009-06-04  5:03       ` Hibou57 (Yannick Duchêne)
2009-06-04 15:20         ` anhvofrcaus
2009-06-04 15:58           ` Hibou57 (Yannick Duchêne)

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