I’ve cloned the Official GCC git repository, which includes a full GCC development history, but git branch -r lists only a few recent branches, and ‘git tag’ reports no tag. git fetch --tags didn’t help. git svn fetch will recreate tags/branches that were in SVN, but will take about 10 days to complete.
I know I could use SVN directly, but would prefer to leverage git’s superior merge capabilities to forward-port changes from gcc-3.3.2.
So, is there a relatively quick way to automatically retrieve git tags or branches for old GCC releases?
To create git tags for GCC releases, you must first clone the git repository with
git clone git://gcc.gnu.org/git/gcc.git ; cd gitand then fetch the release branches, following the instructions in the gcc wiki:Then you can create tags for the various releases as follows:
Note that the commit IDs above were derived manually, but have been verified against SVN where possible with the script below.
I did not provide tags for EGCS releases, but the trick is to check out the release branch and use
git log -p gcc/version.cto reveal the relevant commit IDs.I tried to find a way to do fast automatic tag-setting, and even succeeded for recent (gcc-4.1+) releases, but it seems that the gcc-3.X and early gcc-4.0.X tags in the SVN repository were not imported into the official git repository, so I could not generate correct results for those. The script to do this follows, but again it generates incorrect tags for older releases: