Commit graph

7 commits

Author SHA1 Message Date
Kumar Gala 48cd295a7f armstdc: add limits.h header
Add limits.h header that defines PATH_MAX as this is not defined
by the toolchain headers.

The value of 256 for PATH_MAX is based on how it is set in
lib/libc/minimal/include/limits.h.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-25 12:18:55 +02:00
Kumar Gala af79019146 armstdc: add string.h & strings.h header
Add string.h header that declerates prototype for strnlen()
as this is not provided by the toolchain headers.

Add strings.h to allow anything that expects strncasecmp() to
be defined there to build correctly.  The arm toolchain actually
defines strncasecmp() in <string.h> so we just have <strings.h>
include <string.h>.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-10 16:32:10 -05:00
Kumar Gala 20b21091cc armstdc: Fixup headers as needed by posix
* Move 'struct _timespec' into sys/_timespec.h as expected by
  <posix/time.h>.

* Introduce 'struct timeval' in sys/_timeval.h as expected by
  <posix/time.h>.

* Add mode_t to <sys/types.h> as expected by <posix/stat.h>

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-10 16:32:10 -05:00
Kumar Gala 82538a2d28 armclang: add empty sys/cdefs.h
Various headers include <sys/cdefs.h> like zephyr/posix/sys/stat.h.
When building with the arm-clang toolchain we utilize armstdc
so we need an empty cdefs.h similar to what minimal libc has so
things will build.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-10 16:32:10 -05:00
Gerard Marull-Paretas cbd31d720b lib: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all lib code to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:58:09 +02:00
Nazar Kazakov 9713f0d47c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-14 20:22:24 -04:00
Torsten Rasmussen 36bb00d1f5 armclang: ARM Compiler C library support
Support for ARM Compiler C library.

This commit add support for the ARM Compiler C libary in:
- Kconfig
- libc/armstdc

A new Kconfig symbol is added to allow a toolchain to specify if they
support linking with the minimal C library.
Also the CMake variable `TOOLCHAIN_HAS_NEWLIB` is exported to Kconfig
so that CONFIG_NEWLIB_LIBS can only be enabled if the toolchain has
newlib.

The armclang toolchain selects the CMake scatter file generator and
disables support for the LD linker template which is not supported by
armlink.

For the ARM Compiler C library, a corresponding lib/libc/armstc/ folder
with a minimal implementation to work with the ARM Compiler C library
is added.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-30 08:54:23 -04:00