Rebuilding the RTL : Makefile.adalib?

This is a discussion on Rebuilding the RTL : Makefile.adalib? within the ADA forums in Programming Languages category; 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/so...ses/gcc-4.3.1/ which doesn't have it either; either in the /adalib or /gcc/ada. Do I need ...

Go Back   Application Development Forum > Programming Languages > ADA

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-30-2008, 11:00 AM
Brian Drummond
Guest
 
Default Rebuilding the RTL : Makefile.adalib?


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/so...ses/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_u...e-Library.html

[2]
http://coding.derkeiler.com/Archive/.../msg00459.html

[3]
https://gforge.enseeiht.fr/projects/gnatbench
Reply With Quote
  #2  
Old 07-31-2008, 06:38 AM
Alex R. Mosteo
Guest
 
Default Re: Rebuilding the RTL : Makefile.adalib?

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/so...ses/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_u...e-Library.html
>
> [2]
> http://coding.derkeiler.com/Archive/.../msg00459.html
>
> [3]
> https://gforge.enseeiht.fr/projects/gnatbench


Reply With Quote
  #3  
Old 07-31-2008, 08:35 PM
Brian Drummond
Guest
 
Default Re: Rebuilding the RTL : Makefile.adalib?

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
Reply With Quote
  #4  
Old 08-01-2008, 03:09 PM
Simon Wright
Guest
 
Default Re: Rebuilding the RTL : Makefile.adalib?

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 ...
Reply With Quote
  #5  
Old 08-02-2008, 07:31 AM
John B. Matthews
Guest
 
Default Re: Rebuilding the RTL : Makefile.adalib?

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
Reply With Quote
  #6  
Old 08-03-2008, 06:11 AM
Simon Wright
Guest
 
Default Re: Rebuilding the RTL : Makefile.adalib?

"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.
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 06:21 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.