diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 0f66bd2aaaa0a16b6960e3d632ec016b5d39391b..7c49c72fb50f607b00cee31385fa79e7fb2a0ef9 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* gcc_update: Handle different URL paths and tags.
+
 2007-08-16  Alexandre Oliva  <aoliva@redhat.com>
 
 	* compare-debug: New.
diff --git a/contrib/gcc_update b/contrib/gcc_update
index 7eb839dc687cbbd0ca21cbe27ec706f31b5187f4..f29dcb60927ffc773bd452e412a90b6021cd0264 100755
--- a/contrib/gcc_update
+++ b/contrib/gcc_update
@@ -262,8 +262,9 @@ rm -f LAST_UPDATED gcc/REVISION
 
 revision=`svn info | awk '/Revision:/ { print $2 }'`
 branch=`svn info | sed -ne "/URL:/ {
-s,.*/gcc/,,g
-s,branches/,,
+s,.*/trunk,trunk,
+s,.*/branches/,,
+s,.*/tags/,,
 p
 }"`
 {