Hi community,
I'm struggling with building a GCC toolchain for RTEMS including Ada language 
support. After trying everything I found at Github or in the web, the RTEMS 
documentation or RTEMS source builder, I finally decided to use TASTE's virtual 
machine which I hoped to find a consistent and correct environment, esp. 
regarding the GCC toolchain installed on this system (GCC 6.3.0 with Ada 
support).

To additionally avoid any problems caused by mistakes made in build scripts, I 
fetched the existing build scripts found at:
https://gitrepos.estec.esa.int/taste/taste-setup/tree/master/misc/HW_experiments/GR740_SPW/contrib
 
(https://gitrepos.estec.esa.int/taste/taste-setup/tree/master/misc/HW_experiments/GR740_SPW/contrib)

The scripts should build toolchains for RTEMS 4.11 and 5.1. The RTEMS GCC 
toolchain installed in the VM is obviously built with one of the scripts, at 
least according to the comments and readme files. So I was pretty optimistic to 
be successful after days and weeks of disappointed attempts.

Unfortunately, I once again ran into trouble and couldn't build the toolchain. 
This time the process stopped when during build of GCC because of an undefined 
symbol: 'Restricted_Tasking':

gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/gcc-7.1.0/gcc/ada -O2 -pipe 
-I/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/tmp/sb-root/4.12/rtems-sparc/opt/rtems-4.12-2018.11.29/include
 -g -O2 -W -Wall -gnatpg -gnata -I- 
/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/gcc-7.1.0/gcc/ada/restrict.adb
restrict.adb:1198:33: "Restricted_Tasking" is undefined (more references follow)
gnatmake: 
"/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/gcc-7.1.0/gcc/ada/restrict.adb"
 compilation error
../gcc-interface/Makefile:2640: recipe for target 'gnatmake-re' failed
make[3]: Leaving directory 
'/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/build/gcc/ada/tools'
make[3]: *** [gnatmake-re] Error 4
make[2]: *** [gnattools-cross] Error 2
Makefile:215: recipe for target 'gnattools-cross' failed
make[2]: Leaving directory 
'/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/build/gnattools'
make[1]: *** [all-gnattools] Error 2
Makefile:10575: recipe for target 'all-gnattools' failed
make[1]: Leaving directory 
'/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/build'
make: *** [all] Error 2
Makefile:897: recipe for target 'all' failed
shell cmd failed: /bin/sh -ex 
/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/doit
error: building 
sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1

I then tried to find anything in the web and found this bug report: 
https://gcc.gnu.org/ml/gcc-bugs/2017-07/msg01306.html 
(https://gcc.gnu.org/ml/gcc-bugs/2017-07/msg01306.html) which describes a 
workaround:
- don't build GCC in the source tree (which is already ensured by RSB)
- add C & C++ to the supported languages
- use absolute paths for GCC configuration (I guessed this means: don't use 
../configure)

I edited gcc-common-1.cfg of RSB accordingly to avoid use of relative paths for 
the GCC configuration, but this didn't help. The build process still fails with 
the same issue, independent from RTEMS 4.11 or 5 or if there's an abs path or 
not.

I know that providing an existing GNAT is mandatory when building Ada and that 
I have to build a bootstrap compiler first before resuming with build of the 
final GCC. But I didn't expect the build process to fail in the TASTE VM which 
should provide everything needed to have success.

Does anyone know where to find a really working build script or the required 
RTEMS source builder commit IDs to use? I guess that using the masters of both, 
RTEMS source builder and the kernel, will not work for that, but I can't find a 
tag or branch which points me to the right direction or which works.

Addditionally, there's no information in the RTEMS source builder on how to 
build with Ada support: The description of the TASTE project describes building 
a bootstrap and a final compiler while the original RTEMS source builder 
documentation simply says that parameter --with-ada is enough in combination 
with a GNAT in the PATH. None of that worked.

Is there any chance to get a GCC with Ada support for RTEMS 5?
Which exact version of GCC and which RTEMS source builder and kernel git 
versions/commits are supposed to work (the masters don't work for me, neither 
the commit IDs of TASTE's build.rtems.X.sh scripts work for me)?

I could imagine that the GCC 6.3.0 of the TASTE VM isn't suitable to build 
RTEMS toolchain with RTEMS source builder & kernel masters but I can't find 
information which of all those config files of RSB I have to use for a 
successful build (targets: ARM, x86-64). This is pretty frustrating and very 
disappointing. There are so many variables which are not exactly documented, at 
least for the current version of RSB/kernel.

Thanks in advance for every answer or hint pointing me to the right direction 
(esp. on the question how to define the correct RSB and RTEMS kernel 
versions/commit IDs for a specific native GCC installation)!

Best regards,
Chris Kluge
_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to