quant
quant

Reputation: 23112

How do I download GCC source?

I'm trying to get the GCC source for 4.9.1 to compile it on debian. I googled "How to install GCC" which directed me to this page.

There, under Downloading the source, it claims that GCC is distributed via SVN, linking to this page. It provides the following command for downloading the GCC trunk repo:

svn checkout svn://gcc.gnu.org/svn/gcc/trunk SomeLocalDir

Except I want the latest release, not the trunk branch. Further down on that page it gives this as an example for how to get a specific branch:

svn co svn://gcc.gnu.org/svn/gcc/branches/branchname gcc

So I installed subversion and tried replacing branchname with gcc_4_9_1_release (and a bunch of other combinations that I won't bother listing) which produced this error:

svn: URL 'svn://gcc.gnu.org/svn/gcc/branches/gcc-4_9_1_release' doesn't exist

Anyway that same downloads page has another link to a supposed releases page which contains a list of dead links that presumably hosted GCC at one point or another.

I don't remember it being this hard. If someone could let me know how they obtained this exclusive software I'd be grateful.

Upvotes: 2

Views: 4643

Answers (3)

cjohnson318
cjohnson318

Reputation: 3253

You can use this line to see what releases are available:

svn ls svn://gcc.gnu.org/svn/gcc/tags | grep gcc | grep release

And then download a release as:

svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_5_1_0_release/

Upvotes: 1

Keith Thompson
Keith Thompson

Reputation: 263617

If you want the latest release, it's probably easier to download a tarball from the ftp site.

Currently it's under ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.1/

Upvotes: 2

Erfan
Erfan

Reputation: 349

Use the svn ls svn://gcc.gnu.org/svn/gcc/branches to see all branches. You will then see the latest branch for GCC is gcc-4_9-branch/.

Then use the svn to checkout the latest branch. In this case it will be:

svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch gcc

You will then be able to compile it using the make file provided.

Upvotes: 5

Related Questions