Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
1. refactor the ghs/gcc/clang/armclang toolchain management in CMake
2. unify the cmake toolchain naming style
3. support greenhills build procedure with CMake
4. add protect build for greenhills and gnu toolchain with CMake
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
Macro definitions such as _S in public header files can cause compilation problems under the MSVC compiler.
Move macro definitions that are not used in public locations to the corresponding files
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
The feature depends on ARCH_USE_SEPARATED_SECTION
the different memory area has different access speed and cache
capability, so the arch can custom allocate them based on
section names to achieve performance optimization
test:
sim:elf
sim:sotest
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
The reason is that libc.h needs to check whether CONFIG is enabled before the corresponding macro is enabled
Error scene:
arm-none-eabi-ld: /home/crafcat7/SSD/xxx/xxx-dev/nuttx/staging/libc.a(arch_libc.o): in function `memmove':
/home/crafcat7/SSD/xxx/xxx-dev/nuttx/libs/libc/machine/arch_libc.c:146: multiple definition of `memmove'; /home/crafcat7/SSD/xxx/xxx-dev/nuttx/staging/libc.a(arch_memmove.o):/home/crafcat7/SSD/xxx/xxx-dev/nuttx/libs/libc/machine/arm/armv8-m/gnu/arch_memmove.S:56: first defined here
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
[263/1096] Building C object libs/libc/CMakeFiles/c.dir/misc/lib_pathbuffer.c.obj
ctc W574: ["libs/libc/misc/lib_pathbuffer.c" 144/3] 'return' with an expression in function returning void
Signed-off-by: chao an <anchao@lixiang.com>
and move common math funtions to math32.h:
div_round_up
div_round_closest
is_power_of_2
roundup_pow_of_two
rounddown_pow_of_two
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
unsigned_compare: This greater-than-or-equal-to-zero comparison without a signed value is always true. ndx >= 0U
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
Log:
Untracked files:
(use "git add <file>..." to include in what will be committed)
libs/libc/gnssutils/db46128e73cee26d6a6eb0482dcba544ee1ea9f5.zip
nothing added to commit but untracked files present (use "git add" to track)
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
The commit c4d8d937d5 added null byte for
obstack_vprintf and thus to obstack_printf. I probably lost my marbles
but the same test I run previously now won't append null byte at the end
and this "fix" now causes regressions in code using obstack.
For the reference this is the testing code:
#define _GNU_SOURCE
#include <obstack.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#define obstack_chunk_alloc malloc
#define obstack_chunk_free free
static void print(struct obstack *obs, const char *fmt, ...) {
va_list arg;
va_start(arg, fmt);
obstack_vprintf(obs, fmt, arg);
va_end(arg);
}
int main(int argc, char *argv[]) {
struct obstack obs;
obstack_init(&obs);
obstack_printf(&obs, "this %s", "text ");
obstack_printf(&obs, "is appended");
print(&obs, " as well as %s", "vprintf text");
obstack_1grow(&obs, '\0');
printf("%s\n", (char *)obstack_finish(&obs));
obstack_free(&obs, NULL);
return 0;
}
The output on NuttX without this patch:
> obstest
this text
The output on NuttX with this patch:
> obstest
this text is appended as well as vprintf text
The output with GlibC:
$ gcc test.c && ./a.out
this text is appended as well as vprintf text
$ ldd a.out
linux-vdso.so.1 (0x00007ffff7fc5000)
libc.so.6 => /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libc.so.6 (0x00007ffff7dc8000)
/nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/ld-linux-x86-64.so.2 => /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib64/ld-linux-x86-64.so.2 (0x00007ffff7fc7000)
The output with Musl (and obstack_vprintf removed):
$ gcc -lobstack test-musl.c && ./a.out
this text is appended
$ ldd a.out
/nix/store/00w9nz0343pxk7hbsjzq9bzaby65hk4g-musl-1.2.3/lib/ld-musl-x86_64.so.1 (0x7ffff7f4b000)
libobstack.so.1 => /nix/store/qvv16dqn85qwz9vz9wvpnv435z0n5msr-musl-obstack-1.2.3/lib/libobstack.so.1 (0x7ffff7f3b000)
libc.so => /nix/store/00w9nz0343pxk7hbsjzq9bzaby65hk4g-musl-1.2.3/lib/ld-musl-x86_64.so.1 (0x7ffff7f4b000)
GOTPCRELX reloc available only for CONFIG_ARCH_ADDRENV=y
when CONFIG_ARCH_ADDRENV is not set, CONFIG_ARCH_TEXT_VBASE is not specified
so we can't relocate
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>