diff -uNr crosstool-0.28rc23/getandpatch.sh crosstool-0.28rc23.modified/getandpatch.sh --- crosstool-0.28rc23/getandpatch.sh 2004-05-31 22:51:53.000000000 +0100 +++ crosstool-0.28rc23.modified/getandpatch.sh 2004-07-23 10:07:30.000000000 +0100 @@ -130,6 +130,25 @@ fi done fi + + # Add any extra patches needed for the toolchain archive. This handles + # cases where additional patches are needed for a specific toolchain + # build, and these patches are specific to the particular toolchain, + # and so can't be put into the generic archive patch directory. + # The naming convention used for these extra patches is: + # BASENAME-EXTRA_PATCHES. + if test -d ${TOP_DIR}/patches/${BASENAME}-${EXTRA_PATCHES}; then + for p in ${TOP_DIR}/patches/${BASENAME}-${EXTRA_PATCHES}/*patch* \ + ${TOP_DIR}/patches/${BASENAME}-${EXTRA_PATCHES}/*.diff; do + if test -f $p; then + patch -g0 --fuzz=1 -p1 -f < $p > patch$$.log 2>&1 || { cat patch$$.log ; abort "patch $p failed" ; } + cat patch$$.log + egrep -q "$PATCHFAILMSGS" patch$$.log && abort "patch $p failed" + rm -f patch$$.log + fi + done + fi + } # Remember where source is.