MLECO-3748: Documentation updates

Added documentation around known issue with Arm GNU toolchain
version 12.2.1. Minor change for MLECO-3731 also included.

Link-time warnings for Arm GNU toolchain 11.3.1 also fixed.

Change-Id: Ia8215e9f71327eeb59868aea91729d7b19dd6d34
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
diff --git a/source/hal/source/components/stdout/source/retarget.c b/source/hal/source/components/stdout/source/retarget.c
index 47d5189..41c070a 100644
--- a/source/hal/source/components/stdout/source/retarget.c
+++ b/source/hal/source/components/stdout/source/retarget.c
@@ -1,6 +1,6 @@
 /*
- * SPDX-FileCopyrightText: Copyright 2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
- * SPDX-License-Identifier: Apache-2.0
+ * SPDX-FileCopyrightText: Copyright 2022 Arm Limited and/or its affiliates
+ * <open-source-office@arm.com> SPDX-License-Identifier: Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -287,3 +287,51 @@
 #endif /* #ifndef ferror */
 
 #endif /* !defined(USE_SEMIHOSTING) */
+
+/* If using GNU compiler */
+#if defined(__GNUC__)
+
+/* If Arm GNU compiler version > 11.3.0 */
+#if __GNUC__ > 11 || \
+    (__GNUC__ == 11 && (__GNUC_MINOR__ > 3 || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ > 0)))
+struct stat;
+int _fstat_r(struct _reent* r, int fdes, struct stat* s)
+{
+    (void)(r);
+    (void)(fdes);
+    (void)(s);
+    return -1;
+}
+
+int _getpid_r(struct _reent* r)
+{
+    (void)(r);
+    return -1;
+}
+
+int _isatty_r(struct _reent* r, int desc)
+{
+    (void)(r);
+    (void)(desc);
+    return -1;
+}
+
+int _kill_r(struct _reent* r, int pid, int signal)
+{
+    (void)(r);
+    (void)(pid);
+    (void)(signal);
+    return -1;
+}
+
+_off_t _lseek_r(struct _reent* r, int fdes, _off_t offset, int w)
+{
+    (void)(r);
+    (void)(fdes);
+    (void)(offset);
+    (void)(w);
+    return -1;
+}
+
+#endif /* GNU  toolchain version > 11.3.0 */
+#endif /* If using GNU toolchain */