From: Eric Biggers <ebiggers@kernel.org>
To: Po-Hsu Lin <po-hsu.lin@canonical.com>
Cc: linux-fscrypt@vger.kernel.org
Subject: Re: [fsverity-utils PATCHv2] Makefile: improve the cc-option compatibility
Date: Mon, 3 Aug 2020 09:34:34 -0700 [thread overview]
Message-ID: <20200803163434.GA1057@sol.localdomain> (raw)
In-Reply-To: <20200803030736.6364-1-po-hsu.lin@canonical.com>
On Mon, Aug 03, 2020 at 11:07:36AM +0800, Po-Hsu Lin wrote:
> The build on Ubuntu Xenial with GCC 5.4.0 will fail with:
> cc: error: unrecognized command line option ‘-Wimplicit-fallthrough’
>
> This unsupported flag is not skipped as expected.
>
> It is because of the /bin/sh shell on Ubuntu, DASH, which does not
> support this &> redirection. Use 2>&1 to solve this problem.
>
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index e0a3938..ec23ed6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -32,7 +32,7 @@
> #
> ##############################################################################
>
> -cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null &>/dev/null; \
> +cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null > /dev/null 2>&1; \
> then echo $(1); fi)
>
> CFLAGS ?= -O2 -Wall -Wundef \
> --
> 2.17.1
>
Thanks, applied.
- Eric
prev parent reply other threads:[~2020-08-03 16:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 3:07 [fsverity-utils PATCHv2] Makefile: improve the cc-option compatibility Po-Hsu Lin
2020-08-03 16:34 ` Eric Biggers [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=20200803163434.GA1057@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=po-hsu.lin@canonical.com \
/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