Skip to content

Commit

Permalink
configure: do not fork off grep subprocess in probe_cc
Browse files Browse the repository at this point in the history
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
nodejs/node-v0.x-archive#25671.

Signed-off-by: Ganesh Ajjanagadde <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
Ganesh Ajjanagadde authored and michaelni committed Aug 24, 2015
1 parent fa9af30 commit 0601023
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3566,9 +3566,9 @@ probe_cc(){
gcc_pkg_ver=$(expr "$gcc_version" : '[^ ]* \(([^)]*)\)')
gcc_ext_ver=$(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)")
_ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
if ! $_cc -dumpversion | grep -q '^2\.'; then
_depflags='-MMD -MF $(@:.o=.d) -MT $@'
fi
case $gcc_basever in
2*) _depflags='-MMD -MF $(@:.o=.d) -MT $@' ;;
esac
_cflags_speed='-O3'
_cflags_size='-Os'
elif $_cc --version 2>/dev/null | grep -q ^icc; then
Expand Down

0 comments on commit 0601023

Please sign in to comment.