Skip to content

Commit 6bd90c6

Browse files
committed
PRODKERNEL: strip multiple kpatch-cc prefixes
For debugging kpatch-build, cope with a confused state where the kpatch-cc prefix is applied twice. When stable this should not happen, and should be complained of. While developing, just peel them off Tested: with later commits Upstream-Plan: 190514358 Signed-off-by: Pete Swain <[email protected]>
1 parent b99d393 commit 6bd90c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

kpatch-build/kpatch-cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ if [[ ${KPATCH_GCC_DEBUG:-0} -ne 0 ]]; then
44
set -o xtrace
55
fi
66

7+
# cope with multiply-prefixed invocation
8+
while [[ "$1" =~ /kpatch-cc$ ]]; do
9+
echo >&2 kpatch-cc: stuttered prefix
10+
shift
11+
done
12+
713
TOOLCHAINCMD="$1"
814
shift
915

0 commit comments

Comments
 (0)