comp.lang.ada
 help / color / mirror / Atom feed
From: nospam.jmcoltat@hol.fr (Alain Bizzi)
Subject: Good news: how to compile Gnat 3.10p with gcc 2.7.2.3
Date: 1998/05/05
Date: 1998-05-05T00:00:00+00:00	[thread overview]
Message-ID: <354d8913.451276@news.hol.fr> (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






             reply	other threads:[~1998-05-05  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-05  0:00 Alain Bizzi [this message]
1998-05-15  0:00 ` Good news: how to compile Gnat 3.10p with gcc 2.7.2.3 Andreas Jungmaier
replies disabled

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