mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Zhangjin Wu <falcon@tinylab.org>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	shuah@kernel.org, tanyuan@tinylab.org, w@1wt.eu
Subject: Re: [PATCH 4/4] selftests/nolibc: enable -Wall compiler warnings
Date: Mon, 31 Jul 2023 10:10:36 +0200	[thread overview]
Message-ID: <940dcf77-05ae-4cf6-b5f0-5b8cf80adab6@t-8ch.de> (raw)
In-Reply-To: <20230731071718.21085-1-falcon@tinylab.org>

On 2023-07-31 15:17:18+0800, Zhangjin Wu wrote:
> > It will help the developers to avoid cruft and detect some bugs.
> > 
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > ---
> >  tools/testing/selftests/nolibc/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
> > index f42adef87e12..72227d75c6da 100644
> > --- a/tools/testing/selftests/nolibc/Makefile
> > +++ b/tools/testing/selftests/nolibc/Makefile
> > @@ -79,7 +79,7 @@ endif
> >  CFLAGS_s390 = -m64
> >  CFLAGS_mips = -EL
> >  CFLAGS_STACKPROTECTOR ?= $(call cc-option,-mstack-protector-guard=global $(call cc-option,-fstack-protector-all))
> > -CFLAGS  ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 \
> > +CFLAGS  ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -Wall \
> 
> Very good static analyzer support.
> 
> What about further add more options?
> 
>     +CFLAGS  ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -Wall -Wextra -Werror\
> 
> A simple test shows, it can catch more issues.

-Wextra will need some further rework for 32bit architectures to avoid
some warnings.
(At least mips for which I tested it)

I don't think -Werror is appropriate. If we want to test the functioning
of nolibc with weird compilers these may very well add new warnings and
that shouldn't break the build.

> 
> Thanks,
> Zhangjin
> 
> >  		$(call cc-option,-fno-stack-protector) \
> >  		$(CFLAGS_$(ARCH)) $(CFLAGS_STACKPROTECTOR)
> >  LDFLAGS := -s
> > 
> > -- 
> > 2.41.0

      reply	other threads:[~2023-07-31  8:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31  6:26 [PATCH 0/4] tools/nolibc: enable " Thomas Weißschuh
2023-07-31  6:26 ` [PATCH 1/4] selftests/nolibc: drop unused test helpers Thomas Weißschuh
2023-07-31  6:48   ` Zhangjin Wu
2023-07-31  7:08     ` Thomas Weißschuh
2023-07-31  7:32       ` Zhangjin Wu
2023-07-31  8:23         ` Thomas Weißschuh
2023-07-31 11:02         ` Zhangjin Wu
2023-07-31 15:30           ` Thomas Weißschuh
2023-07-31 16:53             ` Willy Tarreau
2023-07-31 18:36               ` Thomas Weißschuh
2023-07-31 22:49                 ` Willy Tarreau
2023-07-31  6:26 ` [PATCH 2/4] selftests/nolibc: drop unused variables Thomas Weißschuh
2023-07-31  6:26 ` [PATCH 3/4] tools/nolibc: " Thomas Weißschuh
2023-07-31  6:26 ` [PATCH 4/4] selftests/nolibc: enable -Wall compiler warnings Thomas Weißschuh
2023-07-31  7:17   ` Zhangjin Wu
2023-07-31  8:10     ` Thomas Weißschuh [this message]

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=940dcf77-05ae-4cf6-b5f0-5b8cf80adab6@t-8ch.de \
    --to=linux@weissschuh.net \
    --cc=falcon@tinylab.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=tanyuan@tinylab.org \
    --cc=w@1wt.eu \
    /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®