The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/3] tools/nolibc: LTO compatibility
@ 2024-08-10 10:54 Thomas Weißschuh
  2024-08-10 10:54 ` [PATCH 1/3] tools/nolibc: crt: mark _start_c() as used Thomas Weißschuh
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Thomas Weißschuh @ 2024-08-10 10:54 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: Ammar Faizi, linux-kernel, Thomas Weißschuh

A few tiny bugfixes and refactoring to provide compatibility with GCCs
and 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

$ CFLAGS_EXTRA=-flto ./run-tests.sh -m user     
i386:          195 test(s): 191 passed,   2 skipped,   2 failed => status: failure
x86_64:        195 test(s): 191 passed,   2 skipped,   2 failed => status: failure
arm64:         195 test(s): 191 passed,   2 skipped,   2 failed => status: failure
arm:           195 test(s): 191 passed,   2 skipped,   2 failed => status: failure
mips32le:      195 test(s): 190 passed,   3 skipped,   2 failed => status: failure
mips32be:      195 test(s): 190 passed,   3 skipped,   2 failed => status: failure
ppc:           195 test(s): 191 passed,   2 skipped,   2 failed => status: failure
ppc64:         195 test(s): 191 passed,   2 skipped,   2 failed => status: failure
ppc64le:       195 test(s): 191 passed,   2 skipped,   2 failed => status: failure
riscv:         195 test(s): 191 passed,   2 skipped,   2 failed => status: failure
s390:          195 test(s): 190 passed,   3 skipped,   2 failed => status: failure
loongarch:     195 test(s): 190 passed,   3 skipped,   2 failed => status: failure

Note that on GCC two tests always fail, as with -fLTO the constructor
order is inverted, for which nolibc-test contains two testcases.
See [0].

This series depends on the nolibc LLVM support.

[0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103080
[1] https://lore.kernel.org/lkml/20240807-nolibc-llvm-v2-0-c20f2f5fc7c2@weissschuh.net/

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
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: wrap asm functions in functions

 tools/include/nolibc/arch-x86_64.h    | 80 +++++++++++++++++++----------------
 tools/include/nolibc/crt.h            |  2 +-
 tools/include/nolibc/stackprotector.h |  4 +-
 3 files changed, 47 insertions(+), 39 deletions(-)
---
base-commit: 6164f3d0f577a2ab82b8235129fd20b2142e03b1
change-id: 20240728-nolibc-lto-331813b72a0b

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-08-12 19:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-10 10:54 [PATCH 0/3] tools/nolibc: LTO compatibility Thomas Weißschuh
2024-08-10 10:54 ` [PATCH 1/3] tools/nolibc: crt: mark _start_c() as used Thomas Weißschuh
2024-08-10 10:54 ` [PATCH 2/3] tools/nolibc: stackprotector: mark implicitly used symbols " Thomas Weißschuh
2024-08-10 10:54 ` [PATCH 3/3] tools/nolibc: x86_64: wrap asm functions in functions Thomas Weißschuh
2024-08-10 12:12   ` Ammar Faizi
2024-08-10 12:37     ` Thomas Weißschuh
2024-08-10 14:35       ` Willy Tarreau
2024-08-10 16:04         ` Thomas Weißschuh
2024-08-10 16:45           ` Thomas Weißschuh
2024-08-10 17:00             ` Willy Tarreau
2024-08-12 17:01               ` Thomas Weißschuh
2024-08-12 19:38                 ` Willy Tarreau
2024-08-10 19:16           ` Ammar Faizi
2024-08-10 19:45             ` Willy Tarreau
2024-08-10 20:10               ` Ammar Faizi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox