This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Extra patches.


Hi,

There have been several times when I've needed to apply patches which are specific to a particular toolchain build, and not really suitable to go into the general patches directory for the toolchain component, as they would break the builds for the other architectures using that toolchain component.

The method that I use is to put these patches into a new directory under the patches directory, and pass a variable, EXTRA_PATCHES, to getandpatch.sh

So for example building a toolchain, myspecial, using gcc-3.3.2 the additional patches are put into a directory: patches/gcc-3.3.2-myspecial
EXTRA_PATCHES is set to "myspecial" and getandpatch applies the patches in gcc-3.3.2 and gcc-3.3.2-myspecial to gcc-3.3.2


In case others have come across this situation before, I've attached the changes to getandpatch.sh to implement this feature,

- Steve






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.

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]