#! /bin/sh

# If you don't use rpm, you can use this file to apply additional Linux
# patches. At the top level of the binutils source tree, do
#
# /bin/sh patches/README
#
# You may have to do
#
# cd bfd
# make headers
#
# if the build fails.

dir=`dirname $0`

patch -p0 -b --suffix .archive < $dir/libtool-archive-1.patch &&
patch -p0 -b --suffix .relink < $dir/libtool-relink-1.patch &&
patch -p0 -b --suffix .kept < $dir/bfd-kept-4.patch &&
patch -p0 -b --suffix .stabs < $dir/bfd-stabs-3.patch &&
patch -p1 -b --suffix .symtab < $dir/binutils-symtab-4.patch &&
true
[ $? = 0 ] || exit 1
find -name "*.orig" | xargs rm -fv
find -name "*.gmo" | xargs rm -fv
