A gcc compiler, which was configured with
--with-gcc-major-version-only, will only return a single
number. (debian does this for example).
A simple modification allows the check to work with both
single numbers (eg. '9') and full versions (eg. '9.2.1').
Signed-off-by: Norbert Lange <nolange79@gmail.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
exit 0 ; \
fi; \
real_version=`$(1) -dumpversion` ; \
- if [[ ! "$${real_version}" =~ ^$${expected_version}\. ]] ; then \
+ if [[ ! "$${real_version}." =~ ^$${expected_version}\. ]] ; then \
printf "Incorrect selection of gcc version: expected %s.x, got %s\n" \
"$${expected_version}" "$${real_version}" ; \
exit 1 ; \