Dear Barrelfish developers,<div><br></div><div>I would like to keep updated with our progress here at BSC. We have successfully ported the Redhat Newlib to Barrelfish as a libc replacement. To do so, some code in the posixcompat has been rewritten to not call in turn to the libc. This way, calls to write(), read() or sbrk() have been lightly modified to implement the functionality present in the existing libc. The objective has been to not touch the newlib.</div>
<div><br></div><div>Right now, all programs link with newlib, being able to boot all system with this library. Also, in case the old library is needed, I&#39;ve added a variable in the Config for Hake to be able to select which libc library to compile. Both of them are working. To do so, I had to separate includes that were system dependent and others that were libc dependent.</div>
<div><br></div><div>This newlib has been included in the Barrelfish tree but can be used also with the independent gcc cross-compiler that we also developed here. This gives full C++ support with the GNU libstdc++ and exception support. </div>
<div><br></div><div>Some technical details that I had to cope... Now all libraries (vfs, posixcompat, newlib, lwip, nfs...) are always linked in. Because newlib always needs posixcompat as it has the &quot;system calls&quot; implementation. Due to this, vfs, nfs and lwip have to be linked too as the implementation of read() write() have calls to vfs and nfs. In some executables, vfs is not needed but its linked in anyway. There was an issue with this, as vfs_init() was always called as it&#39;s present in the init section of the ELF. Some early executables in the boot process fail in the vfs_init() call as the ramfs is still not available. To solve this, we have placed the vfs_init() call at the start of the programs that use vfs, as most of them don&#39;t use it.</div>
<div><br></div><div>If you wish I can send you the patch to be included in the tree...</div><div><br></div><div><br></div><div>Kind regards,</div><div><div><br></div><div><br></div>-- <br>Zeus Gómez Marmolejo<br>Barcelona Supercomputing Center<br>
PhD student<br><a href="http://www.bsc.es" target="_blank">http://www.bsc.es</a><br><br><br>
</div>