提交 e0099fda 编写于 作者: M Mans Rullgard 提交者: Michael Niedermayer

configure: fix non-standard regex used with expr

The colon operator of expr always anchors the pattern at the start
of the string.  An explicit ^ in the pattern has unspecified
behaviour, so remove it.
Signed-off-by: NMans Rullgard <mans@mansr.com>
(cherry picked from commit 3ad464bf)
上级 48e05567
......@@ -1868,7 +1868,7 @@ elif $cc -v 2>&1 | grep -qi ^gcc; then
cc_version=__VERSION__
gcc_version=$($cc --version | head -n1)
gcc_basever=$($cc -dumpversion)
gcc_pkg_ver=$(expr "$gcc_version" : '^[^ ]* \(([^)]*)\)')
gcc_pkg_ver=$(expr "$gcc_version" : '[^ ]* \(([^)]*)\)')
gcc_ext_ver=$(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)")
cc_ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
if ! $cc -dumpversion | grep -q '^2\.'; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册