comp.lang.ada
 help / color / mirror / Atom feed
* Good news: how to compile Gnat 3.10p with gcc 2.7.2.3
@ 1998-05-05  0:00 Alain Bizzi
  1998-05-15  0:00 ` Andreas Jungmaier
  0 siblings, 1 reply; 2+ messages in thread
From: Alain Bizzi @ 1998-05-05  0:00 UTC (permalink / raw)



First: Sorry for my english, by I am french.

After hours and hours of trys for compiling GNAT-3.10p with a version
of GCC greater than 2.7.2.1, I have find why we don't be able to
compile GNAT?.
The reason is very simple. During the installation of the GNAT
compiler, the files "cc1" and "cpp" are not copied into the GNAT
directory (/usr/lib/gcc-lib/$target/2.7.2.1/). So, when installing the
GNAT compiler with GCC-2.7.2.1, at the end of the installation, copy
these two files from the binaries GNAT distribution into this
directory.

Here is the procedure to compile GNAT-3.10p with GCC-2.7.2.3.

BUILDING GNAT

It seems that the current version of GNAT can be built directly with
GCC 2.7.2.3. The sources for GNAT reside in a subdirectory named ada
under the top level GCC source directory. The directory named src in
this GNAT distribution contains the subdirectory ada which should be
copied to the GCC source directory. When applying the patches be sure
to use the "-p0" option of the patch program. gcc-2721.dif can be
applied to GCC 2.7.2.3 sources.

The procedures described here presume that you have GCC and the
previous version of GNAT installed. The steps here will build and
install new C and Ada compilers on the Linux distribution.

This installation starts from the sources of GCC 2.7.2.3.

  -- Apply patch gcc-2721.dif from the src directory.

  -- Copy the ada directory into the GCC distribution.

  -- Apply patch gcc-2.7.2.2-ada.dif from the ada src directory.

  -- In the ada directory do: 
       'touch treeprs.ads a-[es]info.h nmake.ad[bs]'

  -- From the GCC top level directory follow the GCC directions for
      configure and then:
      make CC=gcc CFLAGS="-O2" LANGUAGES="c c++ proto ada"
      make CC=gcc CFLAGS="-O2" LANGUAGES="c c++ proto ada" bootstrap
      make CC=gcc CFLAGS="-O2" gnattools

To build a version using just native threads on Linux (using
LinuxThreads doing the following is sufficient.

      make CC=gcc CFLAGS="-O2" GNATLIBCFLAGS="-O2" gnatlib
      make install LANGUAGES="c c++ proto ada"

To build only the version with FSU threads

  make CC=gcc CFLAGS="-O2" GNATLIBCFLAGS="-O2" THREAD_KIND=fsu gnatlib
  make install LANGUAGES="c c++ proto ada"

To build and install systems for both thread libraries:

      make CC=gcc CFLAGS="-O2" GNATLIBCFLAGS="-O2" gnatlib
      make install LANGUAGES="c c++ proto ada"
      cd .../lib/gcc-lib/$target/2.7.2.3/
      mkdir rts-native
      mkdir rts-fsu
      mv adalib adainclude rts-native

      cd src
  make CC=gcc CFLAGS="-O2" GNATLIBCFLAGS="-O2" THREAD_KIND=fsu gnatlib
  make install LANGUAGES="c c++ proto ada"

      mv adalib adainclude rts-fsu

      ln -s rts-fsu/adalib .
      ln -s rts-fsu/adainclude .

      cd [GCC top level directory]

One thing more:
If during the compilation, you got this message:
   ./<program_name>: No such file or directory
and the file or the directory exists, this meens that the loader trys
to load a library which don't exists. To find which library the load
wants, use an utility program like 'mc' and see at the beginning of
the program <program_name which library the loader wants. (I have
found this error only one time during all my trys to compile GNAT. The
loader wants the library "/lib/ld-linux.so.2".

Good luck.

Yours sincerly, Alain BIZZI






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

* Re: Good news: how to compile Gnat 3.10p with gcc 2.7.2.3
  1998-05-05  0:00 Good news: how to compile Gnat 3.10p with gcc 2.7.2.3 Alain Bizzi
@ 1998-05-15  0:00 ` Andreas Jungmaier
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Jungmaier @ 1998-05-15  0:00 UTC (permalink / raw)
  To: Alain Bizzi


Hello all,

On Tue, 5 May 1998, Alain Bizzi wrote:
> 
> Here is the procedure to compile GNAT-3.10p with GCC-2.7.2.3.
> BUILDING GNAT
> This installation starts from the sources of GCC 2.7.2.3.
>   -- Apply patch gcc-2721.dif from the src directory.
>   -- Copy the ada directory into the GCC distribution.
>   -- Apply patch gcc-2.7.2.2-ada.dif from the ada src directory.
> 
and so on....
I tried following your advice, but still got some errors .
What I am wondering : where did you get the mentioned patch
gcc-2.7.2.2-ada.dif. I unpacked gnat-3.10p-src.tar.gz, but
that did NOT come with that patch. I assume that that is 
partly responsible for my trouble, as I get the following
errors :
gcc: back_end.adb: linker input file unused since linking not done
gcc -c -O2  -gnatpg -gnata -I. -I. gnat1drv.adb
gcc: gnat1drv.adb: linker input file unused since linking not done
gnatbind -I. -I. -o b_gnat1.c -n gnat1drv.ali
gnatbind: Cannot find: gnat1drv.ali
make[1]: *** [b_gnat1.c] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/gcc-2.7.2.3/ada'
make: *** [gnat1] Error 2                                              

As you see, this is on a redhat based linux box (i586) and, of course
glibc. 
Any comments are welcome (also in french), as we need the ADA
compiler for educational purposes.

Thanx, Andreas

-------------------------------------------------------------------------
Andreas Jungmaier  		ajung@teisa.unican.es
-------------------------------------------------------------------------





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

end of thread, other threads:[~1998-05-15  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-05  0:00 Good news: how to compile Gnat 3.10p with gcc 2.7.2.3 Alain Bizzi
1998-05-15  0:00 ` Andreas Jungmaier

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