Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 3 files (from here)that I have been given to install in an attempt to upgrade the compiler:


I'm kinda fumbling around with this.

What I've done is:

rpm -i mipsel -vv
rpm -i src -vv

I have no idea what to do with the .diff.gz I understand its a patch but dont really know how to deal with it.

share|improve this question

Change to the toplevel source directory (the one containing the files COPYING, bfd and so on) and apply the patch:

zcat ../binutils- | patch -p1

You almost always need to pass either -p0 or -p1 when applying a patch. The number is the number of path components to strip from the file names in the patch. Check the first few lines of the patch. Here, they are

diff -urN binutils- binutils-
--- binutils-        1969-12-31 18:00:00.000000000 -0
+++ binutils-     2003-01-20 17:48:29.000000000 -0600

Since all paths have a leading directory, you need to pass -p1. If the first line was something like diff -urN ../binutils- ChangeLog.PS2 or diff -urN ChangeLog.PS2.orig ChangeLog.PS2, you would use -p0.

Once you've applied the patch, run rpmbuild -bb to build a new binary package.

share|improve this answer
ah thanks, sorry my linux is not so hot, I dont really have a source directory. I assume I have to somehow unpack the .src.rpm – PhilCK Jul 25 '11 at 18:25
@PhilCK Ah, yes, my rpm is a bit rusty. I think that's rpmbuild -bp /usr/src/rpm/SPECS/binutils-, and the source will be unpacked in /usr/src/rpm/SOURCES/binutils- – Gilles Jul 25 '11 at 18:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.