When pulling the compiled kernels to extract the ABI information also
extract the compiler used for that build. Record the result in the abi
directory so it is also recorded historically.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
(cd tmp; find lib/modules/$verabi-$sub/kernel -name '*.ko') | \
sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > \
$abidir/$arch/$sub.modules
+ (
+ cd tmp;
+ ko=`find lib/modules/$verabi-$sub/kernel -name '*.ko' | head -1`
+ readelf -p .comment "$ko" | awk '
+ ($1 == "[") {
+ printf("%s", $3);
+ for (n=4; n<=NF; n++) {
+ printf(" %s", $n);
+ }
+ print ""
+ }' | sort -u >$abidir/$arch/$sub.compiler
+ version=`cat $abidir/$arch/$sub.compiler`
+ echo -n "$version..."
+ )
rm -rf tmp $filename
echo "done."
else
. $DEBIAN/etc/getabis
+compilers=`cat $abidir/*/*.compiler | sort -u | wc -l`
+if [ "$compilers" != 1 ]; then
+ echo "WARNING: inconsistant compiler versions detected" 1>&2
+fi
+
rmdir $tmpdir