From: Andreas Schwab <schwab@suse.de>
To: opensbi@lists.infradead.org
Subject: [PATCH] Makefile: Fix grep warning
Date: Thu, 10 Aug 2023 13:46:19 +0200 [thread overview]
Message-ID: <mvmo7jff7ck.fsf@suse.de> (raw)
In-Reply-To: <20230810-0ea8bc1ee6925836422aa14f@orel> (Andrew Jones's message of "Thu, 10 Aug 2023 13:40:27 +0200")
On Aug 10 2023, Andrew Jones wrote:
> On Thu, Aug 10, 2023 at 01:32:49PM +0200, Andreas Schwab wrote:
>> On Aug 10 2023, Andrew Jones wrote:
>>
>> > grep (at least my version, grep-3.8-3.fc38.x86_64) warns with
>> > "grep: warning: stray \ before -". Fix the warning by making
>> > the command line input to grep less ambiguous.
>> >
>> > Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
>> > ---
>> > Makefile | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/Makefile b/Makefile
>> > index 730dbd910e51..03768a51f710 100644
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -168,7 +168,7 @@ endif
>> > OPENSBI_LD_PIE := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) $(USE_LD_FLAG) -fPIE -nostdlib -Wl,-pie -x c /dev/null -o /dev/null >/dev/null 2>&1 && echo y || echo n)
>> >
>> > # Check whether the compiler supports -m(no-)save-restore
>> > -CC_SUPPORT_SAVE_RESTORE := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -mno-save-restore -x c /dev/null -o /dev/null 2>&1 | grep "\-save\-restore" >/dev/null && echo n || echo y)
>> > +CC_SUPPORT_SAVE_RESTORE := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -mno-save-restore -x c /dev/null -o /dev/null 2>&1 | grep -- "-save-restore" >/dev/null && echo n || echo y)
>>
>> Please use grep -e ... instead.
>
> Sure, but I'd like to put a justification in the commit message, something
> like, Use -e, as opposed to --, because...
It's portable.
--
Andreas Schwab, SUSE Labs, schwab at suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2023-08-10 11:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 11:02 [PATCH] Makefile: Fix grep warning Andrew Jones
2023-08-10 11:32 ` Andreas Schwab
2023-08-10 11:40 ` Andrew Jones
2023-08-10 11:46 ` Andreas Schwab [this message]
2023-08-10 12:11 ` Andrew Jones
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=mvmo7jff7ck.fsf@suse.de \
--to=schwab@suse.de \
--cc=opensbi@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.