comp.lang.ada
 help / color / mirror / Atom feed
* Rebuilding the RTL : Makefile.adalib?
@ 2008-07-30 15:00 Brian Drummond
  2008-07-31 10:38 ` Alex R. Mosteo
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Drummond @ 2008-07-30 15:00 UTC (permalink / raw)



Trying to get an Ada plugin working in Eclipse, I came across Gnatbench
[3 below]. which apparently requires rebuilding the runtime library to
build, and a Makefile that appears to be missing from my distribution.

"It may be useful to recompile the GNAT library in various contexts,
[...] A special Makefile called Makefile.adalib is provided to that
effect and can be found in the directory containing the GNAT library
[1]"

Recently installed openSuse 11, with Gnat 4.3.1, and Makefile.adalib is
not there. 

Downloaded gcc-ada-4.3.1.tar.bz2 from 
ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.3.1/
which doesn't have it either; either in the /adalib or /gcc/ada. 

Do I need to rebuild GCC and Gnat from sources to regenerate it? Or is
there somewhere else can I obtain it?

A web search only finds it in 3.xx versions, yet [2] shows it in use as
late as last November, and Gnatbench 2.1.0 from [3] requires it, so I
presume it isn't obsolete.

- Brian

[1]
http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Rebuilding-the-GNAT-Run_002dTime-Library.html

[2]
http://coding.derkeiler.com/Archive/Ada/comp.lang.ada/2007-11/msg00459.html

[3]
https://gforge.enseeiht.fr/projects/gnatbench



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

* Re: Rebuilding the RTL : Makefile.adalib?
  2008-07-30 15:00 Rebuilding the RTL : Makefile.adalib? Brian Drummond
@ 2008-07-31 10:38 ` Alex R. Mosteo
  2008-08-01  0:35   ` Brian Drummond
  0 siblings, 1 reply; 6+ messages in thread
From: Alex R. Mosteo @ 2008-07-31 10:38 UTC (permalink / raw)


Brian Drummond wrote:

> 
> Trying to get an Ada plugin working in Eclipse, I came across Gnatbench
> [3 below]. which apparently requires rebuilding the runtime library to
> build, and a Makefile that appears to be missing from my distribution.

I tried gnatbench some time ago and I didn't need to recompile the RTL. Perhaps
this was done as part of the installation process, but in that case it was
transparent to me.


> 
> "It may be useful to recompile the GNAT library in various contexts,
> [...] A special Makefile called Makefile.adalib is provided to that
> effect and can be found in the directory containing the GNAT library
> [1]"
> 
> Recently installed openSuse 11, with Gnat 4.3.1, and Makefile.adalib is
> not there.
> 
> Downloaded gcc-ada-4.3.1.tar.bz2 from
> ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.3.1/
> which doesn't have it either; either in the /adalib or /gcc/ada.
> 
> Do I need to rebuild GCC and Gnat from sources to regenerate it? Or is
> there somewhere else can I obtain it?
> 
> A web search only finds it in 3.xx versions, yet [2] shows it in use as
> late as last November, and Gnatbench 2.1.0 from [3] requires it, so I
> presume it isn't obsolete.
> 
> - Brian
> 
> [1]
>
http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Rebuilding-the-GNAT-Run_002dTime-Library.html
> 
> [2]
> http://coding.derkeiler.com/Archive/Ada/comp.lang.ada/2007-11/msg00459.html
> 
> [3]
> https://gforge.enseeiht.fr/projects/gnatbench




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

* Re: Rebuilding the RTL : Makefile.adalib?
  2008-07-31 10:38 ` Alex R. Mosteo
@ 2008-08-01  0:35   ` Brian Drummond
  2008-08-01 19:09     ` Simon Wright
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Drummond @ 2008-08-01  0:35 UTC (permalink / raw)


On Thu, 31 Jul 2008 12:38:14 +0200, "Alex R. Mosteo"
<devnull@mailinator.com> wrote:

>Brian Drummond wrote:
>
>> 
>> Trying to get an Ada plugin working in Eclipse, I came across Gnatbench
>> [3 below]. which apparently requires rebuilding the runtime library to
>> build, and a Makefile that appears to be missing from my distribution.
>
>I tried gnatbench some time ago and I didn't need to recompile the RTL. Perhaps
>this was done as part of the installation process, but in that case it was
>transparent to me.

Thanks for the reply.
The claim is that the RTL needs to be rebuilt with -fPIC (presumably for
position independent code?) which I suppose may already be the case.

I'll go ahead and try without rebuilding tomorrow; but I still can't
help wondering where the missing makefile went, or why it is apparently
no longer in the distribution.

- Brian



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

* Re: Rebuilding the RTL : Makefile.adalib?
  2008-08-01  0:35   ` Brian Drummond
@ 2008-08-01 19:09     ` Simon Wright
  2008-08-02 11:31       ` John B. Matthews
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Wright @ 2008-08-01 19:09 UTC (permalink / raw)


Brian Drummond <brian_drummond@btconnect.com> writes:

> I'll go ahead and try without rebuilding tomorrow; but I still can't
> help wondering where the missing makefile went, or why it is
> apparently no longer in the distribution.

It seems (from rummaging at http://gcc.gnu.org/viewcvs/) that
Makefile.adalib disappeared at GCC 4.0. As to why ... or what you're
supposed to do instead ...



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

* Re: Rebuilding the RTL : Makefile.adalib?
  2008-08-01 19:09     ` Simon Wright
@ 2008-08-02 11:31       ` John B. Matthews
  2008-08-03 10:11         ` Simon Wright
  0 siblings, 1 reply; 6+ messages in thread
From: John B. Matthews @ 2008-08-02 11:31 UTC (permalink / raw)


In article <m24p64y2l0.fsf@mac.com>,
 Simon Wright <simon.j.wright@mac.com> wrote:

> Brian Drummond <brian_drummond@btconnect.com> writes:
> 
> > I'll go ahead and try without rebuilding tomorrow; but I still can't
> > help wondering where the missing makefile went, or why it is
> > apparently no longer in the distribution.
> 
> It seems (from rummaging at http://gcc.gnu.org/viewcvs/) that
> Makefile.adalib disappeared at GCC 4.0. As to why ... or what you're
> supposed to do instead ...

I had this problem integrating an addition to Ada.Numerics, so I wrote 
my own Makefile, shown below and available here:

<http://home.woh.rr.com/jbmatthews/misc/groots.html>

Use gnatls -v to get the prefix. I don't know if it would work for the 
entire RTL.

-----snip-----
# Ada.Numerics Makefile
# 
# Author: John B. Matthews, Gem City Software
# Distribution: GMGPL
# Last Modified: October 2007
#

PREFIX = /usr/local/ada-4.3/lib/gcc/powerpc-apple-darwin8/4.3.0
OPTS = -a -k -gnato -O2
ADAINC = $(PREFIX)/adainclude
ADALIB = $(PREFIX)/adalib
SOURCE = $(wildcard *.ad[sb])
UNITS = $(basename $(wildcard *.ads))
ALIS = $(addsuffix .ali, $(UNITS))
OBJS = $(addsuffix .o, $(UNITS))

.PHONY: all install uninstall clean test

all:
    gnatmake $(OPTS) $(UNITS)

install:
    cp $(SOURCE) $(ADAINC)/
    cp *.ali $(ADALIB)/
    cp *.o $(ADALIB)/

uninstall:
    @for file in $(SOURCE); do ${RM} $(ADAINC)/$$file; done
    @for file in $(ALIS); do ${RM} $(ADALIB)/$$file; done
    @for file in $(OBJS); do ${RM} $(ADALIB)/$$file; done

clean:
    ${RM} *.ali *.o

test:
    @echo "Source files: $(SOURCE)"
    @echo "Compilation units: $(UNITS)"
    @for file in $(SOURCE); do ls $(ADAINC)/$$file; done
    @for file in $(ALIS); do ls $(ADALIB)/$$file; done
    @for file in $(OBJS); do ls $(ADALIB)/$$file; done
-----snip-----

-- 
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews



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

* Re: Rebuilding the RTL : Makefile.adalib?
  2008-08-02 11:31       ` John B. Matthews
@ 2008-08-03 10:11         ` Simon Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Wright @ 2008-08-03 10:11 UTC (permalink / raw)


"John B. Matthews" <nospam@nospam.com> writes:

> I had this problem integrating an addition to Ada.Numerics, so I wrote
> my own Makefile, shown below and available here:
>
> <http://home.woh.rr.com/jbmatthews/misc/groots.html>
>
> Use gnatls -v to get the prefix. I don't know if it would work for the
> entire RTL.

I suppose one would have to be careful about .a, .dylib (or .so, .dll on
other platforms).

I see that AdaCore still distribute Makefile.adalib with at least
6.0.1. It supports rebuilding for cross-compilation, including the C
source files, and special optimisation flags for some units (as an
example, Ada.Exceptions needs to be compiled with -g). But it only
supports static libraries.



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

end of thread, other threads:[~2008-08-03 10:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-30 15:00 Rebuilding the RTL : Makefile.adalib? Brian Drummond
2008-07-31 10:38 ` Alex R. Mosteo
2008-08-01  0:35   ` Brian Drummond
2008-08-01 19:09     ` Simon Wright
2008-08-02 11:31       ` John B. Matthews
2008-08-03 10:11         ` Simon Wright

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