Skip to content

nolibc: fix two build issues at -O0

Willy Tarreau lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tools/nolibc/string: do not use __builtin_strlen() at -O0tools/include/nolibc/string.h+10 -10 replies
2/2tools/nolibc/stdlib: only reference the external environ when inlinedtools/include/nolibc/stdlib.h+15 -71 reply

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchAmmar Faizi
1/2
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] nolibc: fix two build issues at -O0

Hello Paul,

please find in this series two build fixes to apply on top of the series you've already queued:
- gcc errors at -O0 because it doesn't eliminate non-inline code and keeps the reference to the external "environ" from getenv()
- clang fails at -O0 because __builtin_strlen() calls strlen()

I don't care about optimizing at -O0 by definition but at least it should build and work correctly! I've verified that rcutorture still runs.

Thanks!
Willy

---
Willy Tarreau (2):
tools/nolibc/string: do not use __builtin_strlen() at -O0 tools/nolibc/stdlib: only reference the external environ when inlined

 tools/include/nolibc/stdlib.h | 22 +++++++++++++++-------
 tools/include/nolibc/string.h | 11 ++++++++++-
 2 files changed, 25 insertions(+), 8 deletions(-)
Signature · 1 line
2.35.1