public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Dave Chinner <david@fromorbit.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Christoph Hellwig <hch@infradead.org>,
	ksummit@lists.linux.dev, linux-fsdevel@vger.kernel.org,
	gcc-patches@gcc.gnu.org
Subject: Re: [MAINTAINERS/KERNEL SUMMIT] Trust and maintenance of file systems
Date: Thu, 7 Sep 2023 12:48:25 +0300	[thread overview]
Message-ID: <4af7c904-ac36-44c9-83c4-2cb30c732672@kadam.mountain> (raw)
In-Reply-To: <20230906215327.18a45c89@gandalf.local.home>

On Wed, Sep 06, 2023 at 09:53:27PM -0400, Steven Rostedt wrote:
> On Thu, 7 Sep 2023 08:54:38 +1000
> Dave Chinner <david@fromorbit.com> wrote:
> 
> > And let's not forget: removing a filesystem from the kernel is not
> > removing end user support for extracting data from old filesystems.
> > We have VMs for that - we can run pretty much any kernel ever built
> > inside a VM, so users that need to extract data from a really old
> > filesystem we no longer support in a modern kernel can simply boot
> > up an old distro that did support it and extract the data that way.
> 
> Of course there's the case of trying to recreate a OS that can run on a
> very old kernel. Just building an old kernel is difficult today because
> today's compilers will refuse to build them (I've hit issues in bisections
> because of that!)

Yeah.  I can't run Smatch on obsolete kernels because I can't build the
tools/ directory etc.  For example, it would be interesting to look at
really ancient kernels to see how buggy they are.  I started to hunt
down all the Makefile which add a -Werror but there are a lot and
eventually I got bored and gave up.

Someone should patch GCC so there it checks an environment variable to
ignore -Werror.  Somethine like this?

diff --git a/gcc/opts.cc b/gcc/opts.cc
index ac81d4e42944..2de69300d4fe 100644
--- a/gcc/opts.cc
+++ b/gcc/opts.cc
@@ -2598,6 +2598,17 @@ print_help (struct gcc_options *opts, unsigned int lang_mask,
 			 lang_mask);
 }
 
+static bool
+ignore_w_error(void)
+{
+  char *str;
+
+  str = getenv("IGNORE_WERROR");
+  if (str && strcmp(str, "1") == 0)
+    return true;
+  return false;
+}
+
 /* Handle target- and language-independent options.  Return zero to
    generate an "unknown option" message.  Only options that need
    extra handling need to be listed here; if you simply want
@@ -2773,11 +2784,15 @@ common_handle_option (struct gcc_options *opts,
       break;
 
     case OPT_Werror:
+      if (ignore_w_error())
+	break;
       dc->warning_as_error_requested = value;
       break;
 
     case OPT_Werror_:
-      if (lang_mask == CL_DRIVER)
+     if (ignore_w_error())
+	break;
+     if (lang_mask == CL_DRIVER)
 	break;
 
       enable_warning_as_error (arg, value, lang_mask, handlers,

       reply	other threads:[~2023-09-07  9:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ZO9NK0FchtYjOuIH@infradead.org>
     [not found] ` <8718a8a3-1e62-0e2b-09d0-7bce3155b045@roeck-us.net>
     [not found]   ` <ZPkDLp0jyteubQhh@dread.disaster.area>
     [not found]     ` <20230906215327.18a45c89@gandalf.local.home>
2023-09-07  9:48       ` Dan Carpenter [this message]
2023-09-07 11:04         ` Segher Boessenkool
2023-09-07 11:22           ` Steven Rostedt
2023-09-07 12:24             ` Segher Boessenkool
2023-09-07 11:23           ` Dan Carpenter
2023-09-07 12:30             ` Segher Boessenkool
2023-09-12  9:50               ` Richard Biener
2023-10-23  5:19                 ` Eric Gallager

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=4af7c904-ac36-44c9-83c4-2cb30c732672@kadam.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=david@fromorbit.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hch@infradead.org \
    --cc=ksummit@lists.linux.dev \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=rostedt@goodmis.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).