[GSoC 2026] Interest in C11 Annex K (Safeclib) Port - Successful Manual Build on SPARC/ERC32

Hi everyone,

Following up on my introduction, I’ve been digging into the “Add support for C11 Annex K Bounds Checking Functions” project (issue #28).

The issue mentioned that the first step is to evaluate the library and get it to build on RTEMS. Before trying to write the RSB automation scripts, I wanted to make sure I could actually cross-compile safeclib manually.

I spent the last few days working on this for the sparc-rtems7-erc32 BSP, and I managed to successfully build the static library (libsafec.a). I’ve uploaded my build logs and the patch files to my GitHub here: GitHub - YASHBHIWANIA/rtems-safeclib-poc: Proof of Concept manual build of safeclib for RTEMS 7

It wasn’t a straightforward build, but here are the main things I figured out:

  1. The Autotools Config issue: The configure scripts were failing because they couldn’t find the RTEMS confdefs.h. I fixed this by passing a pre-compiled rtems_config.o into the linker flags during configuration.
  2. Floating Point errors: I had to run configure with --disable-float because of some isinfl errors that seemed incompatible with the current Newlib math library.
  3. Code fixes: I found a couple of small bugs in the upstream code (a missing label in vswprintf_s.c and an unused variable in snwprintf_s.c) that broke the build when using -Werror. I patched these locally to get it working.

Next Steps: Now that I have a proven build method and the correct CFLAGS/LDFLAGS, I plan to start drafting my GSoC proposal. My focus will be translating these manual steps into a reproducible RSB Recipe and integrating the __STDC_LIB_EXT1__ guards as requested.

Any feedback would be very awesome!

Best regards, Yash Bhiwania