diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 0eb7ad9673d14a6de7719b1056dd8710b70c87e0..46d9b47ee74c6fc92111036bfeea1b977618379b 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,7 @@
+2007-01-04  Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* Makefile.in (version): Define.
+
 2007-01-03  Daniel Jacobowitz  <dan@codesourcery.com>
 	    Paolo Bonzini  <bonzini@gnu.org>
 
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 0a2b95ed6091ae6365b41bdf55ba0ef3dd006e3c..23bd45301d68f0155c46e5eee4fa4b73a6c08dcb 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -181,6 +181,8 @@ export RANLIB_FOR_TARGET
 export libsubdir
 export slibdir
 
+version := $(shell $(CC) -dumpversion)
+
 DECNUMINC = -I$(srcdir)/../libdecnumber -I$(MULTIBUILDTOP)../../libdecnumber
 
 # Specify the directories to be searched for header files.