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 it's a patch but don't really know how to deal with it.

1 Answer 1


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.

  • 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
    Commented Jul 25, 2011 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- Commented Jul 25, 2011 at 18:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .