From 4b48ed8f387e846e647250b93e3915b06b123d45 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Wed, 27 Jul 2016 00:28:03 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/15908 Reviewed-by: Idwer Vollering Tested-by: build bot (Jenkins) --- util/crossgcc/buildgcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/crossgcc') diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 49f6f4cc10..3f5f562adc 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 } -- cgit v1.2.3