Fix: incorrect search path for newlib/libnosys.a
The cmake script is incorrectly using the NEWLIB_LIBC_PATH variable
to set NEWLIB_LIBNOSYS_PATH while removing NEWLIB_LIBNOSYS_PATH from
the cache.
As a result in some scenarios libnosys was not linked to SP binaries
and linking failed with errors like:
stack_protector.c:(.text+0xc4): undefined reference to `_exit'
This change fixes the cmake script to use the correct variable.
Change-Id: I174221c35e23e639006e0d4c4b2ae739bc5e0b1b
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
diff --git a/external/newlib/newlib.cmake b/external/newlib/newlib.cmake
index 0e3119b..7397941 100644
--- a/external/newlib/newlib.cmake
+++ b/external/newlib/newlib.cmake
@@ -49,7 +49,7 @@
DOC "Location of newlib::libnosys library."
NO_DEFAULT_PATH
)
-set(NEWLIB_LIBNOSYS_PATH ${NEWLIB_LIBC_PATH})
+set(NEWLIB_LIBNOSYS_PATH ${NEWLIB_LIBNOSYS_PATH})
unset(NEWLIB_LIBNOSYS_PATH CACHE)
if (NOT NEWLIB_LIBC_PATH)