Commit 06010238 authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde Committed by Michael Niedermayer

configure: do not fork off grep subprocess in probe_cc

grep is not required for the functionality in this instance.
This avoids an unnecessary fork, and also avoids a duplicated dumpversion call.
Furthermore, it also corrects behavior when no minor version number is present, see e.g
https://github.com/joyent/node/pull/25671.
Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent fa9af304
...@@ -3566,9 +3566,9 @@ probe_cc(){ ...@@ -3566,9 +3566,9 @@ probe_cc(){
gcc_pkg_ver=$(expr "$gcc_version" : '[^ ]* \(([^)]*)\)') gcc_pkg_ver=$(expr "$gcc_version" : '[^ ]* \(([^)]*)\)')
gcc_ext_ver=$(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)") gcc_ext_ver=$(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)")
_ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver") _ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
if ! $_cc -dumpversion | grep -q '^2\.'; then case $gcc_basever in
_depflags='-MMD -MF $(@:.o=.d) -MT $@' 2*) _depflags='-MMD -MF $(@:.o=.d) -MT $@' ;;
fi esac
_cflags_speed='-O3' _cflags_speed='-O3'
_cflags_size='-Os' _cflags_size='-Os'
elif $_cc --version 2>/dev/null | grep -q ^icc; then elif $_cc --version 2>/dev/null | grep -q ^icc; 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