comp.lang.ada
 help / color / mirror / Atom feed
From: David Holm <david@realityrift.com>
Subject: Re: GNAT for Debian
Date: Wed, 23 Jul 2003 11:50:25 GMT
Date: 2003-07-23T11:50:25+00:00	[thread overview]
Message-ID: <20030723134949.7badd43c.david@realityrift.com> (raw)
In-Reply-To: slrnbhsqs0.3o5.randhol+abuse@kiuk0152.chembio.ntnu.no

On Wed, 23 Jul 2003 11:03:47 +0000 (UTC)
Preben Randhol <randhol+abuse@pvv.org> wrote:

> David Holm wrote:
> > But GNU decides what to accept from ACTs patches and what not to
> > accept. They do not blindly apply code that come from ACT. Since ACT
> > is striving for maximum Ada stability it is likely that when
> > GNU-people remove code they will go further away from that goal or
> > otherwise there would be no need for separate codebases.
> 
> I don't know but I would expect that the GNU people only review what the
> changes involve with regards to the rest of gcc? Are there people in GNU
> that has enough knowledge of gnat to review the code?

Not sure, but they review all changes made to the C-code of gcc. If they don't like what they
see ACT would have to modify and send a new patch. I doubt they would spend much time fixing
such stuff as it isn't bugs to gnat only to gcc and they have more important stuff to do.

> > From what I have read recently (although I don't follow the
> > gcc-mailinglists much) it seems that they are more intent on keeping
> > C/C++ etc stable which is likely to impair Ada development since the
> > ACT patch affecting non-ada stuff is growing.  One day there might be
> > two different branches, ACT who is going for stability and GCC where
> > people can freely submit patches moving Ada stuff forward at a faster
> > pace. I wouldn't bet my money on gcc-3 in the near future though.
> > Unless there is a real good reason to use ada from gcc-3 I will stick
> > with the ordinary gnat releases.
> 
> Perhaps it will be like the the gs package where there is one also for
> gs-aladin.

We also considered this. But at the moment there is no point in having both a snapshot of gnat
and gcc-3/ada as gnat has everything of gcc-3/ada and more.

> > On a sidenote, if you or anyone else is interested in building
> > gnat-3.15p packages I could mail you the build procedure I'm using in
> > gentoo. I've found it rather difficult to build properly without lots
> > of extra stuff going on around it. I'm also working on a build
> > process for ACT cvs snapshots, seems they added more fuss to it which
> > changes the buildprocess somewhat.
> 
> Would be great. Could you put it somewhere on the net too?

I'll post it here, then it will live in groups.google.com forever ;). It's not a document, only
the steps taken by the gentoo ebuild to compile and install gnat 3.15p. I will cut out
non-relevant stuff (there might be typos as I translated variables manually).

# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

Files needed:
gnat-3.15p-src.tgz
gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz
gcc-2.8.1.tar.bz2

src_unpack() {
	unpack ${A}

	# Install the bootstrap compiler
	cd /tmp/gnat/gnat-3.15p-i686-pc-linux-gnu-bin
	echo $'\n'3$'\n'/tmp/gnat/boot'\n' | ./doconfig > doconfig.log 2>&1
	./doinstall

	# Prepare the gcc source directory
	cd /tmp/gnat/gcc-2.8.1
	patch -p0 < "/tmp/gnat/gnat-3.15p-src/src/gcc-281.dif"
	touch cstamp-h.in
	mv "/tmp/gnat/gnat-3.15p-src/src/ada" "${S}"
	# Make sure we install it as gnatgcc/gnatgcov as not to overwrite gcc/gcov
	for i in `find ${S}/ada -name '*.ad[sb]'`; do \
		sed -i -e "s/\"gcc\"/\"gnatgcc\"/g" ${i}; \
	done
	cd "/tmp/gnat/gcc-2.8.1/ada"
	touch treeprs.ads a-[es]info.h nmake.ad[bs]
}

src_compile() {
	# Set some paths to our bootstrap compiler.
	export GCC_EXEC_PREFIX="/tmp/gnat/boot/lib/gcc-lib/i686-pc-linux-gnu/2.8.1"
	export ADA_INCLUDE_PATH="/tmp/gnat/boot/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/adainclude"
	export ADA_OBJECTS_PATH="/tmp/gnat/boot/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/adalib"
	OLDPATH="${PATH}"
	export PATH="/tmp/gnat/boot/bin:${PATH}"
	export LDFLAGS="-L/tmp/gnat/boot/lib/gcc-lib/i686-pc-linux-gnu/2.8.1
-L/tmp/gnat/gnat-3.15p-i686-pc-linux-gnu-bin"

	# Make $local_prefix point to $prefix
	sed -i -e "s/@local_prefix@/@prefix@/" "/tmp/gnat/gcc-2.8.1/Makefile.in"

	# Configure gcc
	cd /tmp/gnat/gcc-2.8.1
	./configure --prefix=/usr --program-prefix=gnat \
		--host="${CHOST}" --build="${CHOST}" --target="${CHOST}" \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man

	# Make sure we don't overwrite the existing gcc
	sed -i -e "s/\$(bindir)\/gcov/\$(bindir)\/gnatgcov/" "/tmp/gnat/gcc-2.8.1/Makefile"
	sed -i -e "s/alias)-gcc/alias)-gnatgcc/g" "/tmp/gnat/gcc-2.8.1/Makefile"

	# Compile it by first using the bootstrap compiler and then bootstrapping
	# our own version. Finally compile the libraries and tools.
	make CC="gcc" LANGUAGES="c ada gcov"
	make CC="gcc" LANGUAGES="c ada gcov" bootstrap
	make CC="gcc" GNATLIBCFLAGS="${CFLAGS}" gnatlib
	make CC="gcc" gnattools

}

src_install() {
	export PATH="/tmp/gnat/boot/bin:${PATH}"
	export LDFLAGS="-L/tmp/gnat/boot/lib/gcc-lib/i686-pc-linux-gnu/2.8.1
-L/tmp/gnat/gnat-3.15p-i686-pc-linux-gnu-bin"

	# Install gnatgcc, tools and native threads library
	make LANGUAGES="c ada gcov" GCC_INSTALL_NAME=gnatgcc \
		install-common install-libgcc install-gnatlib install-driver
	touch "/usr/lib/gcc-lib/${CHOST}/2.8.1/include/float.h"

	# Install the FSU threads library
	cd "/usr/lib/gcc-lib/${CHOST}/2.8.1"
	mkdir rts-native
	mkdir rts-fsu

	# Copy the native threads library
	mv adalib adainclude rts-native
	cd /tmp/gnat/gcc-2.8.1
	rm stamp-gnatlib1

	# Compile and install the FSU threads library
	make CC=gcc CFLAGS="-O2" GNATLIBCFLAGS="-fPIC -O2" THREAD_KIND=fsu gnatlib
	make install-gnatlib
	cd "/usr/lib/gcc-lib/${CHOST}/2.8.1"
	mv adalib adainclude rts-fsu

	# Install the precompiled FSU library from the binary distribution
	cp "/tmp/gnat/gnat-3.15p-i686-pc-linux-gnu-bin/libgthreads.a"
"/usr/lib/gcc-lib/${CHOST}/2.8.1"
	cp "/tmp/gnat/gnat-3.15p-i686-pc-linux-gnu-bin/libmalloc.a"
"/usr/lib/gcc-lib/${CHOST}/2.8.1"
}

pkg_postinst() {
	# Make native threads the default runtime system
	ln -sf "/usr/lib/gcc-lib/${CHOST}/2.8.1/rts-native/adalib" \
		"/usr/lib/gcc-lib/${CHOST}/2.8.1/"
	ln -sf "/usr/lib/gcc-lib/${CHOST}/2.8.1/rts-native/adainclude" \
		"/usr/lib/gcc-lib/${CHOST}/2.8.1/"
}


//David Holm



  reply	other threads:[~2003-07-23 11:50 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-21 18:56 GNAT for Debian Francisco Javier Loma Daza
2003-07-21 19:51 ` Samuel Tardieu
2003-07-22  0:12 ` David Holm
2003-07-22  9:03   ` Preben Randhol
2003-07-22 11:55     ` David Holm
2003-07-22 12:16       ` Preben Randhol
2003-07-22 14:53         ` David Holm
2003-07-23 10:00           ` Preben Randhol
2003-07-23 10:25             ` Preben Randhol
2003-07-23 10:56             ` David Holm
2003-07-23 11:03               ` Preben Randhol
2003-07-23 11:50                 ` David Holm [this message]
2003-07-23 12:14                   ` Preben Randhol
2003-07-23 12:26                     ` David Holm
2003-07-23 12:30                       ` Preben Randhol
2003-07-24  8:50                   ` Chris M. Moore
2003-07-24  9:13                     ` Preben Randhol
2003-07-24  9:14                       ` Preben Randhol
2003-07-24 11:44                       ` Chris M. Moore
2003-07-24 11:47                         ` Preben Randhol
2003-07-24 15:54                           ` Chris M. Moore
2003-07-24 21:12                             ` George Shapovalov
2003-07-24 21:58                               ` Simon Wright
2003-07-25  1:39                                 ` George Shapovalov
2003-07-25  6:41                                   ` Ludovic Brenta
2003-07-25 10:54                                     ` Preben Randhol
2003-07-25 10:59                                       ` Preben Randhol
2003-07-25 10:58                                     ` Preben Randhol
2003-07-25 12:35                                     ` Samuel Tardieu
2003-07-26 10:01                                       ` Ludovic Brenta
2003-07-26 10:12                                         ` Samuel Tardieu
2003-07-26  3:36                                     ` Warren W. Gay VE3WWG
2003-07-26  8:51                                       ` Samuel Tardieu
2003-07-25  6:39                                 ` Preben Randhol
2003-07-25  6:55                                   ` Ludovic Brenta
2003-07-25  6:33                             ` Preben Randhol
2003-07-23 18:09               ` Matthew Woodcraft
2003-07-23 18:40                 ` Ludovic Brenta
2003-07-22  8:05 ` Georg Bauhaus
2003-07-22  9:02 ` Preben Randhol
2003-07-22 14:54   ` Francisco Javier Loma Daza
2003-07-22 15:37     ` Samuel Tardieu
2003-07-23 10:01       ` Preben Randhol
2003-07-23 10:08         ` Samuel Tardieu
2003-07-23 10:49           ` Preben Randhol
2003-07-23 10:58             ` Preben Randhol
2003-07-25 11:41         ` Jérôme Marant
2003-07-25 12:05           ` Ludovic Brenta
replies disabled

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