#! /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 -p1 -b --suffix .reloc < $dir/binutils-mips-reloc.patch

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