#! /bin/sh

# If you don't use rpm, you can use this file to apply mips patches.
# Just cd to the top level of the binutils source tree and do
#
# ../mips/READDME
#
# After you have done that, please make sure you run
#
# make headers -C bfd
#
# after running configure to update the bfd header files..


dir=`dirname $0`

patch -p0 -b --suffix .gprel < $dir/gas-mips-gprel.patch && \
patch -p0 -b --suffix .got < $dir/bfd-mips-got.patch
find -name "*.rej" | grep rej && exit 1
find -name "*.orig" | xargs rm -fv
