[PATCH v2 0/3] tools/nolibc: clang LTO compatibility
From: Thomas Weißschuh
Date: Mon Aug 12 2024 - 16:56:19 EST
A few tiny bugfixes and refactoring to provide compatibility with
clangs -flto.
$ CFLAGS_EXTRA=-flto ./run-tests.sh -m user -l
i386: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
x86_64: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
arm64: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
arm: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
mips32le: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
mips32be: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
ppc: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
ppc64: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
ppc64le: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
riscv: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
s390: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
loongarch: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
GCC is not supported, for details read the discussion in v1 of the
series.
Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
Changes in v2:
- Drop GCC support
- arch-x86_64.h: Don't try to wrap the asm functions in C functions,
Instead just replace the local symbol with a local label.
- Link to v1: https://lore.kernel.org/r/20240810-nolibc-lto-v1-0-a86e514c7fc1@xxxxxxxxxxxxxx
---
Thomas Weißschuh (3):
tools/nolibc: crt: mark _start_c() as used
tools/nolibc: stackprotector: mark implicitly used symbols as used
tools/nolibc: x86_64: use local label in memcpy/memmove
tools/include/nolibc/arch-x86_64.h | 4 ++--
tools/include/nolibc/crt.h | 2 +-
tools/include/nolibc/stackprotector.h | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
---
base-commit: 22ba81c50a49468d80055674d8d6f78afb1c92c4
change-id: 20240728-nolibc-lto-331813b72a0b
Best regards,
--
Thomas Weißschuh <linux@xxxxxxxxxxxxxx>