GNAT/RTEMS hassles with bit_ada

lange92 at 2067.resnet.uni.edu lange92 at 2067.resnet.uni.edu
Sun Jul 29 23:14:51 UTC 2001


Hello all,

   Well after applying the patch in the gnat-3.12p/src directory for
gcc-281 (level p0), I managed to get the tools to compile. After that, I
went on to build the i386-rtemself target and pc386 bsp. During the build
of the bsp, I had to copy the files crti.o and crtn.o from "/usr/lib" on my
system; crtbegin.o and crtend.o from "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.8.1"
to each of the sample test programs (hello, paranoia, ticker, unlimited,
base_sp) built.

  Having decided that I'd have to rewrite the Makefile for the
hello_world_ada package, I chose the Makefile.score603e as a base
makefile, made the changes at the top, and attempted to build it. The
first time I received an error from gnatlink about the "-r" option, so
after a quick removal of the "-bargs -r \" line from the Makefile, I
compiled again, and received the following error:

i365-rtemself-gcc: file path prefix: `/users/lange92/illinoiscentral/rtems-i386/pc386//lib' never used
init.o: In function `start_gnat_main':
/users/lange92/illinoiscentral/tools/hello_world_ada/init.c:37: undefined reference to `gnat_main'
i386-rtemself-gnatmake: *** link failed.
make: *** [all] Error 4

Again, I had to copy the files "crti.o crtn.o crtbegin.o crtend.o" to the
hello_world_ada directory to perform a make this successful. Having to
copy files from the base system makes me suspicious of an error in the
installation. So this brings up a few questions:

  1. should I have taken the time during/before/after running the bit_ada
script to build the rts-fsu and rts-native thread libraries?

  2. Question of documentation:
http://www.oarcorp.com/rtems/releases/4.5.0/rtemsdoc-4.5.0/share/rtemsdoc/html/started_ada/started_ada00024.html
"ENABLE_RTEMS_POSIX
    is set to "yes" if you want to enable the RTEMS POSIX API
    support. At this time, this feature is not supported by the
    UNIX ports of RTEMS and is forced to "no" for those targets.
    This corresponds to the configure option --enable-posix.

    This must be enabled to support the GNAT/RTEMS run-time."

  Would linux qualify, in this case, of a UNIX port? If so, does that
mean that linux can't host GNAT/RTEMS? Should I switch to Cygwin or
something that's better supported that can handle the POSIX API?

   3. During the build of the tools (bit_ada) I still get errors about not
finding the files regex.h, reg_types.h, and lc_core.h.

   4. During the bit_ada script execution, twice the script flashed a
message about the necessity of linking with the -LLIBDIR flag, and including
the <toolsdir>/lib directory. Does the bit_rtems script handle this, or is
it something I need to handle myself? I didn't see anything along these
lines in any of the documentation.

   5. Any recommendations on the ideal host environment for GNAT/RTEMS? I
would imagine that I would be able to install Cygwin or whatever without
any difficulties if I could get this runtime to function. It may be a good
deal more difficult to set up than our old runtime, but that one doesn't
have anywhere near the functionality that RTEMS appears to have.

Thanks again, for all the help and words of advice and inspiration. I
appreciate it.

DanL




More information about the users mailing list