Commit 3ad464bf authored by Mans Rullgard's avatar Mans Rullgard
Browse files

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: default avatarMans Rullgard <>
parent 7a4abe59
......@@ -1867,7 +1867,7 @@ elif $cc -v 2>&1 | grep -qi ^gcc; then
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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment