[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems + fixes with 19990708 snapshot.



Hello all,

After much fiddling around I've managed to successfully build an
ELF tool set for the ts_386ex BSP which supports both C++ and
Ada95. This is based on egcs-1.1.2, binutils-2.9.1, newlib-1.8.1,
gdb-4.17, and supports software floating-point emulation.

Getting here involved some bumps, described as follows:


1) The patch egcs-1.1.2-rtems-diff-19990708 is broken. The line:

! files=`find . -type d \! -name '.'-print | sort -r`

should actually be (note extra space):

! files=`find . -type d \! -name '.' -print | sort -r`

When will we ever get fixincludes right? :)



2) gnat/egcs doesn't recognize the "rtemself" OS. Thus, the command
"bit_ada i386-rtemself" results in an ada runtime which doesn't
support tasking!

The following patch should be added to the current patch
egcs-1.1.2-rtems-ada-diff-19990709:

--- egcs-1.1.2/gcc/ada/Makefile.in.orig Thu Aug  5 20:12:30 1999
+++ egcs-1.1.2/gcc/ada/Makefile.in      Thu Aug  5 20:13:29 1999
@@ -849,7 +849,7 @@
   endif
 endif
 
-ifeq ($(strip $(filter-out rtems,$(osys))),)
+ifeq ($(strip $(filter-out rtems rtemself,$(osys))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<4rintnam.ads \
   s-inmaop.adb<7sinmaop.adb \



3) The bit_ada script will generate a tool set that works for ada but
has trouble linking C++ code. The following patch fixes this:

--- bit_ada.orig	Thu Aug  5 20:24:03 1999
+++ bit_ada	Thu Aug  5 20:25:13 1999
@@ -291,17 +291,17 @@
     cd ${TOOLSDIR}/${BUILDDIR}/gcc
 
     echo "BIT_ADA: starting build of gnat"
-    ${MAKE} CC=gcc CFLAGS="-O2" LANGUAGES="c ada" 
+    ${MAKE} CC=gcc CFLAGS="-O2" LANGUAGES="c c++ ada" 
     check_fatal $?  "**** FAILED **** gnat (gnat1)"
     echo "BIT_ADA: completed build of gnat"
 
     echo "BIT_ADA: starting build of cross-gnattools"
-    ${MAKE} CC=gcc CFLAGS="-O2 -g" LANGUAGES="c ada" cross-gnattools
+    ${MAKE} CC=gcc CFLAGS="-O2 -g" LANGUAGES="c c++ ada" cross-gnattools
     check_fatal $?  "**** FAILED **** gnat cross-gnattools"
     echo "BIT_ADA: completed build of cross-gnattools"
 
     echo "BIT_ADA: starting build of ada.all.cross"
-    ${MAKE} CC=gcc CFLAGS="-O2" LANGUAGES="c ada" ada.all.cross
+    ${MAKE} CC=gcc CFLAGS="-O2" LANGUAGES="c c++ ada" ada.all.cross
     check_fatal $?  "**** FAILED **** gnat ada.all.cross"
     echo "BIT_ADA: completed build of ada.all.cross"
 
@@ -313,7 +313,7 @@
     echo "BIT_ADA: completed build of gnatlib"
 
     echo "BIT_ADA: starting install of gnat"
-    ${MAKE} CC=gcc CFLAGS="-O2 -g -gnata -gnatp" LANGUAGES="c ada" install
+    ${MAKE} CC=gcc CFLAGS="-O2 -g -gnata -gnatp" LANGUAGES="c c++ ada" install
     check_fatal $?  "**** FAILED **** gnat install"
     echo "BIT_ADA: completed install of gnat"



4) Properly building gdb-4.17 requires the macro RTEMS_TARGET to be
   defined. It never is. Ideally, there should be an RTEMS specific
   target macro file as part of gdb, which just #defines RTEMS_TARGET.

A quick fix is the following patch:

--- bit_gdb.orig	Thu Aug  5 21:48:56 1999
+++ bit_gdb	Thu Aug  5 22:03:34 1999
@@ -151,7 +151,7 @@
     if [ x${BUILD_DOCS} = xyes ] ; then
       MAKE_DOCS=info
     fi
-    ${MAKE} CC=gcc CFLAGS="-O2 -g" LANGUAGES="c c++" all ${MAKE_DOCS} install
+    ${MAKE} CC=gcc CFLAGS="-O2 -g -DRTEMS_TARGET" LANGUAGES="c c++" all ${MAKE_DOCS} install
     check_fatal $?  "**** FAILED **** build"
 
 # cd back to the main build directory




Hope these fixes make it into the next snapshot...

Tony



  ____________________________________________________________
 /                                                            \
| Tony R. Ambardar         |   Department of Electrical &      |
| M.Sc., M.Eng.            |   Computer Engineering            | 
| Email: tonya at ece.ubc.ca  |   University of British Columbia  |
| Ph: (604) 822-2872       |   2356 Main Mall, Vancouver B.C.  |
| Fax:(604) 822-5949       |   V6T 1Z4  CANADA                 |
 \____________________________________________________________/