[coreboot-gerrit] New patch to review for coreboot: buildgcc: Apply patches with -p1
Nico Huber (nico.h@gmx.de)
gerrit at coreboot.org
Wed Jul 27 00:35:55 CEST 2016
Nico Huber (nico.h at gmx.de) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15908
-gerrit
commit 92470397cbb375b53d7789adfff86eac8fc04dff
Author: Nico Huber <nico.h at gmx.de>
Date: Wed Jul 27 00:28:03 2016 +0200
buildgcc: Apply patches with -p1
Turned out that there are versions of the patch command that use the
left hand side path for new files created by a patch. This behavior is
incompatible with some of our patches. Stripping the topmost dir from
the path with -p1 helps.
While touching that line, I couldn't resist to drop a command
substituion (the `echo $patch`). It really shouldn't be necessary as the
path to the patch file is already expanded in the head of the for loop.
Change-Id: I95398605db6dd54a8b08d8bc84c6602edbea6e10
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
util/crossgcc/buildgcc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 49f6f4c..3f5f562 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -269,7 +269,7 @@ unpack_and_patch() {
for patch in patches/${dir}_*.patch; do
test -r $patch || continue
printf " o $(basename $patch)\n"
- $PATCH -s -N -p0 < $(echo $patch) || {
+ (cd ${dir} && $PATCH -s -N -p1 <../${patch}) || {
printf "\n${RED}Failed $patch.${NC}\n"
exit 1
}
More information about the coreboot-gerrit
mailing list