Version 4 (modified by Vaibhav Gupta, on Jun 24, 2019 at 4:44:25 PM) (diff)


POSIX Compliance

Student(s): Vaibhav Gupta.

Mentors: Joel Sherrill, Aditya Upadhyay, Hesham .

Ticket: POSIX Compliance

Development Blog: My GSoC 2019 Journey

Introduction to Project

Project Description

(Content Derived from my Proposal) This Project deals with the implementation of a subset of functions that is defined in FACE (8) Technical Standard 3.0 and POSIX (6) IEEE Standard 1003.1™ . Due to physical resource constraints some real time systems like small embedded system needs limited set of operating system functionality. For these type of system it is necessary that the standards allow implementation to support only a particular subset of POSIX functions. For instance, there is an approved change request against FACE 3.0 to make support for multiple processes optional. Any method listed in the FACE Technical Standard Edition 3.0, in Appendix A.1 as POSIX_MULTI_PROCESS is now optional. This is logical for embedded systems like RTEMS which follows Single Process Multi Threading Concept.

Project Goal

The goal is to add missing functions and libraries to newlib, which in turn will make RTEMS complaint to latest POSIX and FACE standards.

Project Setup

Project Sandboxing on my System

Home Folder (~): /home/varodek

	|	|
	|	|____/5 	#- Directory for toolchain for rtems5
	|	|____/rsb 	#- contains RSB
	|	|____/kernel
	|		|____/erc32 			#- contains RTEMS kernel for SPARC
	|		|____/xilinx_zynq_a9_qemu 	#- contains RTEMS kernel for ARM
	|		|____/rtems			#- rtems clone from git repository
		|____/b-sparc-rtems5-newlib	#- newlib compiled for SPARC using rtems5 toolchain
		|____/b-arm-rtems5-newlib	#- newlib compiled fro ARM using rtems5 toolchain
                |____/newlib-cygwin             #- Clone of newlib from git repository

Managing Autoconf versions in sub-directories of Newlib Source Tree

For my GSoC project, I need to port some codes in Newlib. As other good projects, Newlib also uses Autoconf tools for producing “” and various other useful scripts. The situation is, inside its source tree, newlib-cygwin/uses autoconf tools version 2.64. Whereas newlib-cygwin/newlib/libc uses autoconf tools version 2.69.

I wrote a blog for this: How To Handle Two Versions of autoconf?

Apply Newlib Patche to RTEMS Source Builder

After creating patches for Newlib, I need to submit them to Newlib mailing list for review. But before I must make sure that the changes are successfully working. As Newlib is used by RTEMS as its C Library, one way is to use the patch in RTEMS and design a testsuite for it. If tests are successful, the changes are fine.

Apply Newlib Patch to RTEMS Source Builder

Task: Add psxinttypes01 for <inttypes.h> methods

This task was continued by me, original work belongs to the GSoC 2017 student of same project. The working directory is : rtems/testsuites/psxtests.

Modify the testsuite psxinttypes01/init.c

There was need to modify the original code to add some more tests and fix some bugs. inttypes uses strtoimax and wcstoimax. The 'opengroup' page contains every information to write testcases. For a good testsuite, every output (expected or error value) has to be verified.

The patch:

Add psxinttypes01/psxinttypes01.doc and psxinttypes01/psxinttypes01.scn


Entry had to be made for psxinttypes01 in, so as it gets build with rest of the testsuites of rtems. Note, not to change the alphabetical order of the previous entries.

diff --git a/testsuites/psxtests/ b/testsuites/psxtests/
index cdd6ee7e4e..85559e4aa5 100644
--- a/testsuites/psxtests/
+++ b/testsuites/psxtests/
@@ -91,6 +91,7 @@ RTEMS_TEST_CHECK([psxid01])


This entry is made to generate make commands inside Note $(support_includes) CPPFLAG is necesaary to include required header files.

diff --git a/testsuites/psxtests/ b/testsuites/psxtests/
index 1e354c0df7..59c9f2085b 100755
--- a/testsuites/psxtests/
+++ b/testsuites/psxtests/
@@ -523,6 +523,13 @@ psxintrcritical01_CPPFLAGS = $(AM_CPPFLAGS) \

+if TEST_psxinttypes01
+psx_tests += psxinttypes01
+psxinttypes01_SOURCES = psxinttypes01/init.c
+psxinttypes01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxinttypes01) \
+       $(support_includes)
 if TEST_psxitimer
 psx_tests += psxitimer