[Letux-kernel] [PATCH 0/2] Regex fixes for mips and x86 cross-compile

H. Nikolaus Schaller hns at goldelico.com
Sat Jul 3 15:52:01 CEST 2021


Please comment - before I make myself a fool by POSTing such fundamental
things where I don't know who the maintainers are...

BR and thanks,
Nikolaus


> Am 03.07.2021 um 15:48 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> 

Oops... the series description was lost :(

Mainly it will repeat the error messages for cross-compiling x86 and mips
and describe the problem (regexp and POSIX syntax more enforced by BSD)
and the solution.

And add some test results showing the different behavious of egrep:

Test Linux:

root at letux:~# echo foo | egrep '^(|foo)$'
foo
root at letux:~# echo fool | egrep '^(foo)?$'
root at letux:~# echo fun | egrep '^(|foo)$'
root at letux:~# echo f | egrep '^(|foo)$'
root at letux:~# echo | egrep '^(|foo)$'

root at letux:~# echo foo | egrep '^(foo)?$'
foo
root at letux:~# echo fool | egrep '^(foo)?$'
root at letux:~# echo fun | egrep '^(foo)?$'
root at letux:~# echo f | egrep '^(foo)?$'
root at letux:~# echo  | egrep '^(foo)?$'

root at letux:~# 

Test BSD:

iMac:master hns$ echo foo | egrep '^(|foo)$'
egrep: empty (sub)expression
iMac:master hns$ echo fool | egrep '^(foo)?$'
egrep: empty (sub)expression
iMac:master hns$ echo fun | egrep '^(|foo)$'
egrep: empty (sub)expression
iMac:master hns$ echo f | egrep '^(|foo)$'
egrep: empty (sub)expression
iMac:master hns$ echo | egrep '^(|foo)$'
egrep: empty (sub)expression
iMac:master hns$ echo foo | egrep '^(foo)?$'
foo
iMac:master hns$ echo fool | egrep '^(foo)?$'
iMac:master hns$ echo fun | egrep '^(foo)?$'
iMac:master hns$ echo f | egrep '^(foo)?$'
iMac:master hns$ echo  | egrep '^(foo)?$'

> 
> 
> H. Nikolaus Schaller (2):
>  x86/tools/relocs: Fix non-POSIX regexp
>  arch: mips: Fix non-POSIX regexp
> 
> arch/mips/Makefile      | 2 +-
> arch/x86/tools/relocs.c | 8 ++++----
> 2 files changed, 5 insertions(+), 5 deletions(-)
> 
> -- 
> 2.31.1
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20210703/85d5a9bf/attachment.htm>


More information about the Letux-kernel mailing list