mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Vincent Dagonneau <v@vda.io>
Cc: linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/4] tools/nolibc: add stdint and more integer types
Date: Sun, 19 Feb 2023 19:51:29 +0100	[thread overview]
Message-ID: <20230219185133.14576-1-w@1wt.eu> (raw)

Hi Vincent,

I could finally work out the various issues. In short, all of the
problems came from the dependency on __WORDSIZE and the fact that
when not defined, the tests would default to the 32-bit ones. The
reason why it seldom worked was that some cross-compilers configured
to build for the same build and target arch do still mistakenly
include files from /usr/include and inadvertently get some glibc
entries. I changed these locations to rely on __SIZEOF_LONG__ instead
that's provided by the compiler and which I've tested to work fine
since pretty old compilers. For the values I've switched to __LONG_MAX__
that is also defined by the compiler, and this allows us to get rid
of the ifdef and hard-coded values in stdint.h.

Now everything works fine on all supported architectures.

I'd like you to have a look at this patch set, it's yours with
these small changes that I've commented before my s-o-b when
relevant. I would appreciate it if you could recheck everything,
possibly change some stuff if you think it's needed, and also
adjust your commit messages where relevant to match the final
state, dropping my own temporary comments and s-o-b that are
not needed.

One important note, I've based the patch on Paul's latest branch
named "dev.2023.02.06a" here:

  https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/

It contains the pending patches that will soon be submitted to Linus,
and support for the s390x platform that I wanted to confirm does work
fine as well. If you need to change some code, please rebase on this
branch before testing.

Thanks!
Willy

--
Vincent Dagonneau (4):
  tools/nolibc: add stdint.h
  tools/nolibc: add integer types and integer limit macros
  tools/nolibc: enlarge column width of tests
  tools/nolibc: add tests for the integer limits in stdint.h

 tools/include/nolibc/Makefile                |   4 +-
 tools/include/nolibc/std.h                   |  15 +-
 tools/include/nolibc/stdint.h                |  75 ++++++++++
 tools/testing/selftests/nolibc/nolibc-test.c | 141 ++++++++++++-------
 4 files changed, 170 insertions(+), 65 deletions(-)
 create mode 100644 tools/include/nolibc/stdint.h

-- 
2.35.3


             reply	other threads:[~2023-02-19 18:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19 18:51 Willy Tarreau [this message]
2023-02-19 18:51 ` [RFC PATCH 1/4] tools/nolibc: add stdint.h Willy Tarreau
2023-02-19 18:51 ` [RFC PATCH 2/4] tools/nolibc: add integer types and integer limit macros Willy Tarreau
2023-02-19 19:16   ` Thomas Weißschuh
2023-02-19 19:23     ` Willy Tarreau
2023-02-20  9:14   ` David Laight
2023-02-20 14:47     ` Willy Tarreau
2023-02-20 20:27       ` Vincent Dagonneau
2023-02-19 18:51 ` [RFC PATCH 3/4] tools/nolibc: enlarge column width of tests Willy Tarreau
2023-02-19 18:51 ` [RFC PATCH 4/4] tools/nolibc: add tests for the integer limits in stdint.h Willy Tarreau
2023-02-19 19:04   ` Thomas Weißschuh
2023-02-19 19:15     ` Willy Tarreau
2023-02-20 20:29       ` Vincent Dagonneau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230219185133.14576-1-w@1wt.eu \
    --to=w@1wt.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=v@vda.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®