aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-04-09 10:35:29 +0100
committerPedro Alves <palves@redhat.com>2015-04-09 10:35:29 +0100
commitf543dc83b84d8ebcd0899dfd16215b884b7762fa (patch)
treeb67efc4c2b8d271eb7b327c23195a844fd9cd7e0
parentc8f4bfdd120601d3841b2617b623412a47b8f35f (diff)
downloadgdb-f543dc83b84d8ebcd0899dfd16215b884b7762fa.zip
gdb-f543dc83b84d8ebcd0899dfd16215b884b7762fa.tar.gz
gdb-f543dc83b84d8ebcd0899dfd16215b884b7762fa.tar.bz2
update-gnulib.sh: work around aclocal warning with Perl >= 5.16
gdb/ChangeLog: 2015-04-09 Pedro Alves <palves@redhat.com> * gnulib/update-gnulib.sh (aclocal version check): Filter out "called too early to check prototype".
-rw-r--r--gdb/ChangeLog5
-rwxr-xr-x[-rw-r--r--]gdb/gnulib/update-gnulib.sh18
2 files changed, 22 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a5139f5..53d0cfc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-09 Pedro Alves <palves@redhat.com>
+
+ * gnulib/update-gnulib.sh (aclocal version check): Filter out
+ "called too early to check prototype".
+
2015-04-08 Sergio Durigan Junior <sergiodj@redhat.com>
PR python/16699
diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh
index 5c7238f..957c89a 100644..100755
--- a/gdb/gnulib/update-gnulib.sh
+++ b/gdb/gnulib/update-gnulib.sh
@@ -110,7 +110,23 @@ if [ "$ver" != "$AUTOMAKE_VERSION" ]; then
fi
# Verify that we have the correct version of aclocal.
-ver=`aclocal --version 2>&1 | head -1 | sed 's/.*) //'`
+#
+# The grep below is needed because Perl >= 5.16 dumps a "called too
+# early to check prototype" warning when running aclocal 1.11.1. This
+# causes trouble below, because the warning is the first line output
+# by aclocal, resulting in:
+#
+# $ sh ./update-gnulib.sh ~/src/gnulib/src/
+# Error: Wrong aclocal version: called too early to check prototype at /opt/automake-1.11.1/bin/aclocal line 617.. Aborting.
+#
+# Some distros carry an automake patch for that:
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=aclocal-function-prototypes.debdiff;att=1;bug=752784
+#
+# But since we prefer pristine FSF versions of autotools, work around
+# the issue here. This can be removed later when we bump the required
+# automake version.
+#
+ver=`aclocal --version 2>&1 | grep -v "called too early to check prototype" | head -1 | sed 's/.*) //'`
if [ "$ver" != "$ACLOCAL_VERSION" ]; then
echo "Error: Wrong aclocal version: $ver. Aborting."
exit 1