x86: make embedded endbr64 check compatible with older GNU grep
authorJan Beulich <jbeulich@suse.com>
Fri, 25 Feb 2022 09:49:17 +0000 (10:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 25 Feb 2022 09:49:17 +0000 (10:49 +0100)
commit91fa912206d83518661062d70e6082a70eadb6ec
tree77f12fd8745c3782e3b0750dc9238717d1f8f109
parentbed9ae54df44b9f6914eae4c6d231be41d859ecd
x86: make embedded endbr64 check compatible with older GNU grep

With version 2.7 I'm observing support for binary searches, but
unreliable results: Only a subset of the supposed matches is actually
reported; for our pattern I've never observed any match. This same
version works fine when handing it a Perl regexp using hex or octal
escapes. Probe for support of -P and prefer that over the original
approach.

Fixes: 4d037425dccf ("x86: Build check for embedded endbr64 instructions")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/tools/check-endbr.sh