Message ID | 20180530071610.24915-1-joel@jms.id.au |
---|---|
State | Accepted |
Headers | show |
Series | Makefile: Check -Wno-stringop-truncation is supported | expand |
Joel Stanley <joel@jms.id.au> writes: > The cross compiler on my system throws a fit as it does not understand > this option: > > cc1: error: unrecognized command line option '-Wno-stringop-truncation' [-Werror] > > Fixes: 918b7233d3bb ("Add -Wno-stringop-truncation for GCC8") > Signed-off-by: Joel Stanley <joel@jms.id.au> In the grand tradition of finding old patches that aren't yet merged and that still apply and fix a thing that somebody found was broke, merged to master as of cd2b103f2488220fc4b05ffcb2f404d821f243aa
diff --git a/Makefile.main b/Makefile.main index a155e1e66601..8d50f0e05d5a 100644 --- a/Makefile.main +++ b/Makefile.main @@ -31,7 +31,7 @@ CWARNS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -Wwrite-strings -Wcast-align \ -Winit-self \ -Wframe-larger-than=1024 \ - -Wno-stringop-truncation \ + $(call try-cflag,$(CC),--Wno-stringop-truncation) \ -Werror # Host tools and options
The cross compiler on my system throws a fit as it does not understand this option: cc1: error: unrecognized command line option '-Wno-stringop-truncation' [-Werror] Fixes: 918b7233d3bb ("Add -Wno-stringop-truncation for GCC8") Signed-off-by: Joel Stanley <joel@jms.id.au> --- Makefile.main | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)