This commit adds support for the newlib configuration option '--enable-newlib-retargetable-locking'. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>