zephyr/lib/libc
Patryk Duda 759dcfe18f llvm: stdint: Don't define integer constant macros in llvm.h
Zephyr minimal libc implements integer constant macros using internal
headers provided by GCC, for example INT64_C(x) is just a __INT64_C(x)
which is implemented by the GCC.

Clang compiler doesn't provide these definitions, so we define them
(__INT64_C() and INT64_C()) in zephyr/toolchain/llvm.h, but it looks
like INT64_C() definition doesn't come from llvm.h, but from stdlib.h
despite of checking if __GNUC__ is defined.

This is because Clang sometimes pretends to be GNU compiler:
$ x86_64-pc-linux-gnu-clang -dM -E - < /dev/null | grep "GNU"
 #define __GNUC_MINOR__ 2
 #define __GNUC_PATCHLEVEL__ 1
 #define __GNUC_STDC_INLINE__ 1
 #define __GNUC__ 4

Let's keep the integer constant macros in stdlib.h and their
actual implementation in llvm.h. Also define these macros if __clang__
is defined, just in case.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-05-20 18:04:54 +02:00
..
arcmwdt ARCMWDT: Add headers for POSIX compatibility 2023-12-19 08:53:51 -06:00
armstdc lib: libc: armstdc: add missing retarget of fputc to _stdout_hook 2023-10-04 11:02:37 +02:00
common libc: minimal: Add 'noreturn' attribute to abort() and exit() 2024-05-06 17:32:17 +01:00
minimal llvm: stdint: Don't define integer constant macros in llvm.h 2024-05-20 18:04:54 +02:00
newlib buildsystem: Enable LTO also for the application 2024-03-02 15:39:36 +01:00
picolibc buildsystem: Enable LTO also for the application 2024-03-02 15:39:36 +01:00
CMakeLists.txt
Kconfig libc/picolibc: Support Picolibc for toolchains without bundled Picolibc 2024-05-09 10:28:35 +02:00