blob: 17fb3d9f2401f213391b1c957e2b17f8df53ffe7 [file] [log] [blame] [raw]
'gcc -v' output may contain 'version' in multiple lines.
diff -ru --exclude-from freebsd-src-diff-exclude-names /var/tmp/freebsd-10.3-src/usr/src/sys/conf/newvers.sh freebsd-10.3/usr/src/sys/conf/newvers.sh
--- /var/tmp/freebsd-10.3-src/usr/src/sys/conf/newvers.sh 2016-03-25 09:09:25.000000000 +0800
+++ freebsd-10.3/usr/src/sys/conf/newvers.sh 2019-03-11 22:09:05.571271704 +0800
@@ -97,7 +97,7 @@
t=`date`
fi
i=`${MAKE:-make} -V KERN_IDENT`
-compiler_v=$($(${MAKE:-make} -V CC) -v 2>&1 | grep 'version')
+compiler_v=$($(${MAKE:-make} -V CC) -v 2>&1 | grep -m 1 -E ' version [0-9]+')
for dir in /usr/bin /usr/local/bin; do
if [ ! -z "${svnversion}" ] ; then