Hi everyone, I hope this is the correct category to post.
I am trying to build the compiler for RTEMS 6.1 under a CentOS 7 machine (due to legacy reasons, it is still being used, it also contains RTEMS 4.10 installation and it is conencted physically to the target hardware).
I am encountering problems during gmp compilation. It requires C99 for compilation, but GCC <5 (4.8.4 in Centos7 as far as I remember) defaults to C89 to compile. The auto-generated makefile does not pass any C version command to gcc.
I could not convince the source builder to use C99 for gmp through modifications on the gmp.cfg file, using CFLAGS=‘-std=gnu99’ similarly to this post. The generated do-build, for some reason, removes all -std=gnu99 flags from the build. I tried with C11 (CFLAGS=‘-std=gnu11’) without luck too.
What I tried and worked was to manually modify the do-build script (removing the sed parts that mention -std=gnu99) but that is not really clean nor scalable.
Any tips/clues on how to force the build to use C99 for gmp? I did not find what GCC versions are required for the Source Builder to work properly, so I suppose the 4.8.4 is still good for RTEMS 6.1.
I can share the logs as desired. In any case, I think I am being dense by using the wrong flag on the gmp.cfg, so it might not even be necessary.
Thanks for your attention!