diff mbox series

Makefiles: Remove --Wno-stringop-truncation

Message ID 20190725053638.8261-1-oohall@gmail.com
State Accepted
Headers show
Series Makefiles: Remove --Wno-stringop-truncation | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (1b638f899525da0f3185449114426b1eeb6ef4de)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Oliver O'Halloran July 25, 2019, 5:36 a.m. UTC
To disable a warning you use the command line parameter:

	 -Wno-<warning-name>, not
	--Wno-<warning-name>

GCC seems to ignore parameters starting with a double dash, so we've
been building with the stringop-trunction warning enabled for about a
year now and no one has complained. Away it goes.

Fixes: cd2b103f2488 ("Makefile: Check -Wno-stringop-truncation is supported")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 Makefile.main | 1 -
 1 file changed, 1 deletion(-)

Comments

Stewart Smith July 26, 2019, 5:55 a.m. UTC | #1
"Oliver O'Halloran" <oohall@gmail.com> writes:
> To disable a warning you use the command line parameter:
>
> 	 -Wno-<warning-name>, not
> 	--Wno-<warning-name>
>
> GCC seems to ignore parameters starting with a double dash, so we've
> been building with the stringop-trunction warning enabled for about a
> year now and no one has complained. Away it goes.

I think Joel originally submitted this... probably for some reason, but
maybe that reason was only valid on a weird toolchain that was looking
at him funny that day? Or we solidly messed it up.
Oliver O'Halloran July 26, 2019, 6:04 a.m. UTC | #2
On Fri, Jul 26, 2019 at 3:55 PM Stewart Smith <stewart@linux.ibm.com> wrote:
>
> "Oliver O'Halloran" <oohall@gmail.com> writes:
> > To disable a warning you use the command line parameter:
> >
> >        -Wno-<warning-name>, not
> >       --Wno-<warning-name>
> >
> > GCC seems to ignore parameters starting with a double dash, so we've
> > been building with the stringop-trunction warning enabled for about a
> > year now and no one has complained. Away it goes.
>
> I think Joel originally submitted this... probably for some reason, but
> maybe that reason was only valid on a weird toolchain that was looking
> at him funny that day? Or we solidly messed it up.

You added it in commit 918b7233d3bb ("Add -Wno-stringop-truncation for
GCC8") since we compile with -Werror and it was a spurious warning.
Joel added the try-cflag check in cd2b103f2488 ("Makefile: Check
-Wno-stringop-truncation is supported") because his compiler (GCC7?)
didn't have -Wno-stringop-truncation and threw and error because of
it. Joel's patch added the --, so we've been compiling with it enabled
for a while now.
Stewart Smith July 29, 2019, 1:36 a.m. UTC | #3
"Oliver O'Halloran" <oohall@gmail.com> writes:
> On Fri, Jul 26, 2019 at 3:55 PM Stewart Smith <stewart@linux.ibm.com> wrote:
>>
>> "Oliver O'Halloran" <oohall@gmail.com> writes:
>> > To disable a warning you use the command line parameter:
>> >
>> >        -Wno-<warning-name>, not
>> >       --Wno-<warning-name>
>> >
>> > GCC seems to ignore parameters starting with a double dash, so we've
>> > been building with the stringop-trunction warning enabled for about a
>> > year now and no one has complained. Away it goes.
>>
>> I think Joel originally submitted this... probably for some reason, but
>> maybe that reason was only valid on a weird toolchain that was looking
>> at him funny that day? Or we solidly messed it up.
>
> You added it in commit 918b7233d3bb ("Add -Wno-stringop-truncation for
> GCC8") since we compile with -Werror and it was a spurious warning.
> Joel added the try-cflag check in cd2b103f2488 ("Makefile: Check
> -Wno-stringop-truncation is supported") because his compiler (GCC7?)
> didn't have -Wno-stringop-truncation and threw and error because of
> it. Joel's patch added the --, so we've been compiling with it enabled
> for a while now.

hah - well then,

Acked-by: Stewart Smith <stewart@linux.ibm.com>
Oliver O'Halloran July 30, 2019, 4:31 a.m. UTC | #4
On Thu, Jul 25, 2019 at 3:36 PM Oliver O'Halloran <oohall@gmail.com> wrote:
>
> To disable a warning you use the command line parameter:
>
>          -Wno-<warning-name>, not
>         --Wno-<warning-name>
>
> GCC seems to ignore parameters starting with a double dash, so we've
> been building with the stringop-trunction warning enabled for about a
> year now and no one has complained. Away it goes.
>
> Fixes: cd2b103f2488 ("Makefile: Check -Wno-stringop-truncation is supported")
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>

Merged as 53baedfd19436e8cc33151a0c17cb57863f7303a
diff mbox series

Patch

diff --git a/Makefile.main b/Makefile.main
index 56fa2bae9e14..efadb821107e 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -30,7 +30,6 @@  CWARNS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
 	  -Wmissing-prototypes -Wmissing-declarations \
 	  -Wwrite-strings -Wcast-align \
 	  -Winit-self \
-	  $(call try-cflag,$(CC),--Wno-stringop-truncation) \
 	  -Werror
 
 # Host tools and options